1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
parent 4c58cdc9a1
commit 4f7449beba
7 changed files with 24 additions and 15 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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