summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-24 08:48:46 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-24 08:48:46 +0000
commit4f7449bebae380c2f60530d2b9a51a703f2f7cb6 (patch)
tree95f8505a6f092d20ddf2ceebc002da1d186721df
parent4c58cdc9a1a7296b6202f8ad4cf2b72581c61d6d (diff)
downloadruby-4f7449bebae380c2f60530d2b9a51a703f2f7cb6.tar.gz
* 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
-rw-r--r--ChangeLog9
-rw-r--r--lib/gserver.rb8
-rw-r--r--lib/logger.rb2
-rw-r--r--lib/optparse.rb2
-rw-r--r--lib/rbconfig/obsolete.rb2
-rw-r--r--lib/resolv.rb14
-rw-r--r--lib/webrick/httpresponse.rb2
7 files changed, 24 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 1926de2607..6efb1855f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/lib/gserver.rb b/lib/gserver.rb
index d7b4a0783e..78593ee45d 100644
--- a/lib/gserver.rb
+++ b/lib/gserver.rb
@@ -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
diff --git a/lib/logger.rb b/lib/logger.rb
index 7d76d25e33..79944fa93c 100644
--- a/lib/logger.rb
+++ b/lib/logger.rb
@@ -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
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 1e3986afd7..6d12064b5d 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -1833,7 +1833,7 @@ XXX
end
def inspect
- "#<#{self.class.to_s}: #{args.join(' ')}>"
+ "#<#{self.class}: #{args.join(' ')}>"
end
#
diff --git a/lib/rbconfig/obsolete.rb b/lib/rbconfig/obsolete.rb
index 7025fb43fb..52bc5c20d4 100644
--- a/lib/rbconfig/obsolete.rb
+++ b/lib/rbconfig/obsolete.rb
@@ -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
diff --git a/lib/resolv.rb b/lib/resolv.rb
index 7b2f7f031c..9c7dd1b9b3 100644
--- a/lib/resolv.rb
+++ b/lib/resolv.rb
@@ -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:
diff --git a/lib/webrick/httpresponse.rb b/lib/webrick/httpresponse.rb
index 9656f81b83..e897e8c01b 100644
--- a/lib/webrick/httpresponse.rb
+++ b/lib/webrick/httpresponse.rb
@@ -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