diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-27 12:21:41 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-27 12:21:41 +0000 |
commit | e47fec1f8697e85acd5ba8992372dbe11628053a (patch) | |
tree | a7b69a78c25765cfd7a0ccc231364a0f25caa39c | |
parent | 3e8515bf36d9e02e912e326797329c069a56d3bd (diff) |
* lib/drb/acl.rb: Removed meaningless #to_s methods in interpolation.
[Feature #10174][ruby-core:64584]
* lib/erb.rb: ditto.
* lib/observer.rb: ditto.
* lib/rake/invocation_chain.rb: ditto.
* lib/rubygems/command_manager.rb: ditto.
* lib/rubygems/config_file.rb: ditto.
* lib/uri/common.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | lib/drb/acl.rb | 2 | ||||
-rw-r--r-- | lib/erb.rb | 2 | ||||
-rw-r--r-- | lib/observer.rb | 2 | ||||
-rw-r--r-- | lib/rake/invocation_chain.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/command_manager.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/config_file.rb | 2 | ||||
-rw-r--r-- | lib/uri/common.rb | 2 |
8 files changed, 18 insertions, 7 deletions
@@ -1,3 +1,14 @@ +Wed Aug 27 21:19:40 2014 gogo tanaka <[email protected]> + + * lib/drb/acl.rb: Removed meaningless #to_s methods in interpolation. + [Feature #10174][ruby-core:64584] + * lib/erb.rb: ditto. + * lib/observer.rb: ditto. + * lib/rake/invocation_chain.rb: ditto. + * lib/rubygems/command_manager.rb: ditto. + * lib/rubygems/config_file.rb: ditto. + * lib/uri/common.rb: ditto. + Wed Aug 27 21:08:20 2014 gogo tanaka <[email protected]> * lib/drb/drb.rb: use attr_reader instead of Module#attr. diff --git a/lib/drb/acl.rb b/lib/drb/acl.rb index 8d06b25829..72e034e960 100644 --- a/lib/drb/acl.rb +++ b/lib/drb/acl.rb @@ -223,7 +223,7 @@ class ACL when 'deny' @deny.add(domain) else - raise "Invalid ACL entry #{list.to_s}" + raise "Invalid ACL entry #{list}" end i += 2 end diff --git a/lib/erb.rb b/lib/erb.rb index b30812fa95..c372f56da8 100644 --- a/lib/erb.rb +++ b/lib/erb.rb @@ -548,7 +548,7 @@ class ERB def initialize(compiler, enc=nil) @compiler = compiler @line = [] - @script = enc ? "#coding:#{enc.to_s}\n" : "" + @script = enc ? "#coding:#{enc}\n" : "" @compiler.pre_cmd.each do |x| push(x) end diff --git a/lib/observer.rb b/lib/observer.rb index 99610f7505..10f2eb0db5 100644 --- a/lib/observer.rb +++ b/lib/observer.rb @@ -127,7 +127,7 @@ module Observable def add_observer(observer, func=:update) @observer_peers = {} unless defined? @observer_peers unless observer.respond_to? func - raise NoMethodError, "observer does not respond to `#{func.to_s}'" + raise NoMethodError, "observer does not respond to `#{func}'" end @observer_peers[observer] = func end diff --git a/lib/rake/invocation_chain.rb b/lib/rake/invocation_chain.rb index 690435169a..540628957c 100644 --- a/lib/rake/invocation_chain.rb +++ b/lib/rake/invocation_chain.rb @@ -31,7 +31,7 @@ module Rake private def prefix - "#{tail.to_s} => " + "#{tail} => " end # Null object for an empty chain. diff --git a/lib/rubygems/command_manager.rb b/lib/rubygems/command_manager.rb index fdee064fed..54636bf996 100644 --- a/lib/rubygems/command_manager.rb +++ b/lib/rubygems/command_manager.rb @@ -136,7 +136,7 @@ class Gem::CommandManager def run(args, build_args=nil) process_args(args, build_args) rescue StandardError, Timeout::Error => ex - alert_error "While executing gem ... (#{ex.class})\n #{ex.to_s}" + alert_error "While executing gem ... (#{ex.class})\n #{ex}" ui.backtrace ex terminate_interaction(1) diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb index cf14017ea2..1f4afba0f4 100644 --- a/lib/rubygems/config_file.rb +++ b/lib/rubygems/config_file.rb @@ -337,7 +337,7 @@ if you believe they were disclosed to a third party. end return content rescue *YAMLErrors => e - warn "Failed to load #{filename}, #{e.to_s}" + warn "Failed to load #{filename}, #{e}" rescue Errno::EACCES warn "Failed to load #{filename} due to permissions problem." end diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 00051a88fa..facca4b08b 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -51,7 +51,7 @@ module URI end else raise ArgumentError, - "expected Array of or Hash of components of #{klass.to_s} (#{klass.component[1..-1].join(', ')})" + "expected Array of or Hash of components of #{klass} (#{klass.component[1..-1].join(', ')})" end tmp[:scheme] = klass.to_s.sub(/\A.*::/, '').downcase |