[前][次][番号順一覧][スレッド一覧]

ruby-changes:35217

From: hsbt <ko1@a...>
Date: Wed, 27 Aug 2014 21:21:50 +0900 (JST)
Subject: [ruby-changes:35217] hsbt:r47299 (trunk): * lib/drb/acl.rb: Removed meaningless #to_s methods in interpolation.

hsbt	2014-08-27 21:21:41 +0900 (Wed, 27 Aug 2014)

  New Revision: 47299

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47299

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/lib/drb/acl.rb
    trunk/lib/erb.rb
    trunk/lib/observer.rb
    trunk/lib/rake/invocation_chain.rb
    trunk/lib/rubygems/command_manager.rb
    trunk/lib/rubygems/config_file.rb
    trunk/lib/uri/common.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47298)
+++ ChangeLog	(revision 47299)
@@ -1,3 +1,14 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Aug 27 21:19:40 2014  gogo tanaka  <mail@t...>
+
+	* 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@t...>
 
 	* lib/drb/drb.rb: use attr_reader instead of Module#attr.
Index: lib/rake/invocation_chain.rb
===================================================================
--- lib/rake/invocation_chain.rb	(revision 47298)
+++ lib/rake/invocation_chain.rb	(revision 47299)
@@ -31,7 +31,7 @@ module Rake https://github.com/ruby/ruby/blob/trunk/lib/rake/invocation_chain.rb#L31
     private
 
     def prefix
-      "#{tail.to_s} => "
+      "#{tail} => "
     end
 
     # Null object for an empty chain.
Index: lib/observer.rb
===================================================================
--- lib/observer.rb	(revision 47298)
+++ lib/observer.rb	(revision 47299)
@@ -127,7 +127,7 @@ module Observable https://github.com/ruby/ruby/blob/trunk/lib/observer.rb#L127
   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
Index: lib/rubygems/config_file.rb
===================================================================
--- lib/rubygems/config_file.rb	(revision 47298)
+++ lib/rubygems/config_file.rb	(revision 47299)
@@ -337,7 +337,7 @@ if you believe they were disclosed to a https://github.com/ruby/ruby/blob/trunk/lib/rubygems/config_file.rb#L337
       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
Index: lib/rubygems/command_manager.rb
===================================================================
--- lib/rubygems/command_manager.rb	(revision 47298)
+++ lib/rubygems/command_manager.rb	(revision 47299)
@@ -136,7 +136,7 @@ class Gem::CommandManager https://github.com/ruby/ruby/blob/trunk/lib/rubygems/command_manager.rb#L136
   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)
Index: lib/uri/common.rb
===================================================================
--- lib/uri/common.rb	(revision 47298)
+++ lib/uri/common.rb	(revision 47299)
@@ -51,7 +51,7 @@ module URI https://github.com/ruby/ruby/blob/trunk/lib/uri/common.rb#L51
         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
 
Index: lib/erb.rb
===================================================================
--- lib/erb.rb	(revision 47298)
+++ lib/erb.rb	(revision 47299)
@@ -548,7 +548,7 @@ class ERB https://github.com/ruby/ruby/blob/trunk/lib/erb.rb#L548
       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
Index: lib/drb/acl.rb
===================================================================
--- lib/drb/acl.rb	(revision 47298)
+++ lib/drb/acl.rb	(revision 47299)
@@ -223,7 +223,7 @@ class ACL https://github.com/ruby/ruby/blob/trunk/lib/drb/acl.rb#L223
       when 'deny'
         @deny.add(domain)
       else
-        raise "Invalid ACL entry #{list.to_s}"
+        raise "Invalid ACL entry #{list}"
       end
       i += 2
     end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]