* lib/gserver.rb: remove redundant use of to_s in interpolation.

* lib/logger.rb: ditto.
* lib/optparse.rb: ditto.
* lib/rbconfig/obsolete.rb: ditto.
* lib/resolv.rb: ditto.
* lib/webrick/httpresponse.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2014-06-24 08:48:46 +00:00
Родитель 4c58cdc9a1
Коммит 4f7449beba
7 изменённых файлов: 24 добавлений и 15 удалений

Просмотреть файл

@ -1,3 +1,12 @@
Tue Jun 24 14:46:17 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* lib/gserver.rb: remove redundant use of to_s in interpolation.
* lib/logger.rb: ditto.
* lib/optparse.rb: ditto.
* lib/rbconfig/obsolete.rb: ditto.
* lib/resolv.rb: ditto.
* lib/webrick/httpresponse.rb: ditto.
Tue Jun 24 10:50:06 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* hash.c (env_path_str_new): make PATH environment variable

Просмотреть файл

@ -161,7 +161,7 @@ class GServer
# Return true to allow this client to connect, false to prevent it.
def connecting(client)
addr = client.peeraddr
log("#{self.class.to_s} #{@host}:#{@port} client:#{addr[1]} " +
log("#{self.class} #{@host}:#{@port} client:#{addr[1]} " +
"#{addr[2]}<#{addr[3]}> connect")
true
end
@ -171,7 +171,7 @@ class GServer
#
# +clientPort+:: the port of the client that is connecting
def disconnecting(clientPort)
log("#{self.class.to_s} #{@host}:#{@port} " +
log("#{self.class} #{@host}:#{@port} " +
"client:#{clientPort} disconnect")
end
@ -179,12 +179,12 @@ class GServer
# Called when the server is starting up, if auditing is enabled.
def starting()
log("#{self.class.to_s} #{@host}:#{@port} start")
log("#{self.class} #{@host}:#{@port} start")
end
# Called when the server is shutting down, if auditing is enabled.
def stopping()
log("#{self.class.to_s} #{@host}:#{@port} stop")
log("#{self.class} #{@host}:#{@port} stop")
end
protected :starting, :stopping

Просмотреть файл

@ -805,7 +805,7 @@ private
rescue
log(FATAL, "Detected an exception. Stopping ... #{$!} (#{$!.class})\n" << $@.join("\n"))
ensure
log(INFO, "End of #{ @appname }. (status: #{ status.to_s })")
log(INFO, "End of #{ @appname }. (status: #{ status })")
end
status
end

Просмотреть файл

@ -1833,7 +1833,7 @@ XXX
end
def inspect
"#<#{self.class.to_s}: #{args.join(' ')}>"
"#<#{self.class}: #{args.join(' ')}>"
end
#

Просмотреть файл

@ -4,7 +4,7 @@ module ::RbConfig
class << Obsolete
def _warn_
loc, = caller_locations(2, 1)
loc = "#{loc.to_s}: " if loc
loc = "#{loc}: " if loc
warn "#{loc}Use RbConfig instead of obsolete and deprecated Config."
self
end

Просмотреть файл

@ -1175,7 +1175,7 @@ class Resolv
end
def inspect
return "#<#{self.class} #{self.to_s}>"
return "#<#{self.class} #{self}>"
end
def ==(other)
@ -1220,7 +1220,7 @@ class Resolv
end
def inspect # :nodoc:
"#<#{self.class}: #{self.to_s}#{@absolute ? '.' : ''}>"
"#<#{self.class}: #{self}#{@absolute ? '.' : ''}>"
end
##
@ -2346,7 +2346,7 @@ class Resolv
end
def inspect # :nodoc:
return "#<#{self.class} #{self.to_s}>"
return "#<#{self.class} #{self}>"
end
##
@ -2489,7 +2489,7 @@ class Resolv
end
def inspect # :nodoc:
return "#<#{self.class} #{self.to_s}>"
return "#<#{self.class} #{self}>"
end
##
@ -2639,7 +2639,7 @@ class Resolv
end
def inspect # :nodoc:
return "#<#{self.class} #{self.to_s}>"
return "#<#{self.class} #{self}>"
end
def ==(other) # :nodoc:
@ -2728,7 +2728,7 @@ class Resolv
end
def inspect # :nodoc:
return "#<#{self.class} #{self.to_s}>"
return "#<#{self.class} #{self}>"
end
def ==(other) # :nodoc:
@ -2790,7 +2790,7 @@ class Resolv
end
def inspect # :nodoc:
return "#<#{self.class} #{self.to_s}>"
return "#<#{self.class} #{self}>"
end
def ==(other) # :nodoc:

Просмотреть файл

@ -321,7 +321,7 @@ module WEBrick
# res.set_redirect WEBrick::HTTPStatus::TemporaryRedirect
def set_redirect(status, url)
@body = "<HTML><A HREF=\"#{url.to_s}\">#{url.to_s}</A>.</HTML>\n"
@body = "<HTML><A HREF=\"#{url}\">#{url}</A>.</HTML>\n"
@header['location'] = url.to_s
raise status
end