* 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
This commit is contained in:
hsbt 2014-08-27 12:21:41 +00:00
parent 3e8515bf36
commit e47fec1f86
8 changed files with 18 additions and 7 deletions

View File

@ -1,3 +1,14 @@
Wed Aug 27 21:19:40 2014 gogo tanaka <mail@tanakakazuki.com>
* 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 <mail@tanakakazuki.com>
* lib/drb/drb.rb: use attr_reader instead of Module#attr.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -31,7 +31,7 @@ module Rake
private
def prefix
"#{tail.to_s} => "
"#{tail} => "
end
# Null object for an empty chain.

View File

@ -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)

View File

@ -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

View File

@ -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