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

ruby-changes:1753

From: ko1@a...
Date: 24 Aug 2007 18:58:11 +0900
Subject: [ruby-changes:1753] matz - Ruby:r13244 (trunk): * test/ruby/test_dir.rb (TestDir::setup): ?c now makes a string.

matz	2007-08-24 18:57:53 +0900 (Fri, 24 Aug 2007)

  New Revision: 13244

  Modified files:
    trunk/ChangeLog
    trunk/lib/drb/drb.rb
    trunk/lib/net/imap.rb
    trunk/lib/net/smtp.rb
    trunk/lib/test/unit/autorunner.rb
    trunk/test/pathname/test_pathname.rb
    trunk/test/ruby/test_alias.rb
    trunk/test/ruby/test_dir.rb
    trunk/test/ruby/test_eval.rb
    trunk/test/ruby/test_primitive.rb
    trunk/test/socket/test_socket.rb
    trunk/test/socket/test_udp.rb

  Log:
    * test/ruby/test_dir.rb (TestDir::setup): ?c now makes a string.
    
    * lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::initialize):
      initialize @workdir to stop warning.
    
    * lib/drb/drb.rb (DRb::DRbServer::InvokeMethod::perform_without_block): 
      replace funcall by send!.  other files in the distribution as well.

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/pathname/test_pathname.rb?r1=13244&r2=13243
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/test/unit/autorunner.rb?r1=13244&r2=13243
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/socket/test_socket.rb?r1=13244&r2=13243
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/net/imap.rb?r1=13244&r2=13243
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13244&r2=13243
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_dir.rb?r1=13244&r2=13243
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/socket/test_udp.rb?r1=13244&r2=13243
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/net/smtp.rb?r1=13244&r2=13243
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_eval.rb?r1=13244&r2=13243
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_alias.rb?r1=13244&r2=13243
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_primitive.rb?r1=13244&r2=13243
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/drb/drb.rb?r1=13244&r2=13243

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 13243)
+++ ChangeLog	(revision 13244)
@@ -1,3 +1,15 @@
+Fri Aug 24 18:42:03 2007  Yukihiro Matsumoto  <matz@r...>
+
+	* test/ruby/test_dir.rb (TestDir::setup): ?c now makes a string.
+
+	* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::initialize):
+	  initialize @workdir to stop warning.
+
+Fri Aug 24 18:30:50 2007  Yukihiro Matsumoto  <matz@r...>
+
+	* lib/drb/drb.rb (DRb::DRbServer::InvokeMethod::perform_without_block): 
+	  replace funcall by send!.  other files in the distribution as well.
+
 Fri Aug 24 17:06:56 2007  Yukihiro Matsumoto  <matz@r...>
 
 	* eval.c (rb_f_send_bang): abandon the name funcall for private
Index: lib/test/unit/autorunner.rb
===================================================================
--- lib/test/unit/autorunner.rb	(revision 13243)
+++ lib/test/unit/autorunner.rb	(revision 13244)
@@ -81,6 +81,7 @@
         @filters = []
         @to_run = []
         @output_level = UI::NORMAL
+        @workdir = false
         yield(self) if(block_given?)
       end
 
Index: lib/net/smtp.rb
===================================================================
--- lib/net/smtp.rb	(revision 13243)
+++ lib/net/smtp.rb	(revision 13244)
@@ -719,7 +719,7 @@
     def authenticate(user, secret, authtype = DEFAULT_AUTH_TYPE)
       check_auth_method authtype
       check_auth_args user, secret
-      funcall auth_method(authtype), user, secret
+      send! auth_method(authtype), user, secret
     end
 
     def auth_plain(user, secret)
Index: lib/net/imap.rb
===================================================================
--- lib/net/imap.rb	(revision 13243)
+++ lib/net/imap.rb	(revision 13244)
@@ -1231,7 +1231,7 @@
 
     class RawData # :nodoc:
       def send_data(imap)
-        imap.funcall(:put_string, @data)
+        imap.send!(:put_string, @data)
       end
 
       private
@@ -1243,7 +1243,7 @@
 
     class Atom # :nodoc:
       def send_data(imap)
-        imap.funcall(:put_string, @data)
+        imap.send!(:put_string, @data)
       end
 
       private
@@ -1255,7 +1255,7 @@
 
     class QuotedString # :nodoc:
       def send_data(imap)
-        imap.funcall(:send_quoted_string, @data)
+        imap.send!(:send_quoted_string, @data)
       end
 
       private
@@ -1267,7 +1267,7 @@
 
     class Literal # :nodoc:
       def send_data(imap)
-        imap.funcall(:send_literal, @data)
+        imap.send!(:send_literal, @data)
       end
 
       private
@@ -1279,7 +1279,7 @@
 
     class MessageSet # :nodoc:
       def send_data(imap)
-        imap.funcall(:put_string, format_internal(@data))
+        imap.send!(:put_string, format_internal(@data))
       end
 
       private
Index: lib/drb/drb.rb
===================================================================
--- lib/drb/drb.rb	(revision 13243)
+++ lib/drb/drb.rb	(revision 13244)
@@ -1553,7 +1553,7 @@
 	  end
 	  ary.collect(&@obj)[0]
 	else
-	  @obj.funcall(@msg_id, *@argv)
+	  @obj.send!(@msg_id, *@argv)
 	end
       end
 
Index: test/ruby/test_alias.rb
===================================================================
--- test/ruby/test_alias.rb	(revision 13243)
+++ test/ruby/test_alias.rb	(revision 13244)
@@ -56,7 +56,7 @@
     d = lambda {
       $SAFE = 4
       dclass = Class.new(C)
-      dclass.funcall(:alias_method, :mm, :m)
+      dclass.send!(:alias_method, :mm, :m)
       dclass.new
     }.call
     assert_raise(SecurityError) { d.mm }
Index: test/ruby/test_dir.rb
===================================================================
--- test/ruby/test_dir.rb	(revision 13243)
+++ test/ruby/test_dir.rb	(revision 13244)
@@ -10,10 +10,10 @@
   def setup
     Dir.mkdir(ROOT)
     for i in ?a..?z
-      if i % 2 == 0
-        FileUtils.touch(File.join(ROOT, i.chr))
+      if i.ord % 2 == 0
+        FileUtils.touch(File.join(ROOT, i))
       else
-        FileUtils.mkdir(File.join(ROOT, i.chr))
+        FileUtils.mkdir(File.join(ROOT, i))
       end
     end
   end
@@ -31,7 +31,7 @@
         break unless name = dir.read
         cache << [pos, name]
       end
-      for x,y in cache.sort_by {|x| x[0] % 3 } # shuffle
+      for x,y in cache.sort_by {|z| z[0] % 3 } # shuffle
         dir.seek(x)
         assert_equal(y, dir.read)
       end
Index: test/ruby/test_eval.rb
===================================================================
--- test/ruby/test_eval.rb	(revision 13243)
+++ test/ruby/test_eval.rb	(revision 13244)
@@ -124,7 +124,7 @@
       obj.class.class_variable_set :@@cvar, 13
           # Use same value with env. See also test_instance_variable_cvar.
       obj.class.const_set :Const, 15 unless obj.class.const_defined?(:Const)
-      funcall mid, obj
+      send! mid, obj
     end
   end
 
@@ -364,7 +364,7 @@
     assert_nothing_raised {
       def temporally_method_for_test_eval_and_define_method(&block)
         lambda {
-          class << Object.new; self end.funcall(:define_method, :zzz, &block)
+          class << Object.new; self end.send!(:define_method, :zzz, &block)
         }
       end
       v = eval("temporally_method_for_test_eval_and_define_method {}")
Index: test/ruby/test_primitive.rb
===================================================================
--- test/ruby/test_primitive.rb	(revision 13243)
+++ test/ruby/test_primitive.rb	(revision 13244)
@@ -50,7 +50,7 @@
     assert_equal 3, A::B::C::Const
     assert_equal 3, A::B::C.new.const
     assert_equal 1, ::TestRubyPrimitive::A::Const
-    A::B::C.funcall(:remove_const, :Const)
+    A::B::C.send!(:remove_const, :Const)
     assert_equal 2, A::B::C.new.const
     assert_raise(TypeError) {
       C::CONST
Index: test/socket/test_socket.rb
===================================================================
--- test/socket/test_socket.rb	(revision 13243)
+++ test/socket/test_socket.rb	(revision 13244)
@@ -19,7 +19,7 @@
       n = s.getsockopt(Socket::SOL_SOCKET, Socket::SO_ERROR)
       assert_equal([0].pack("i"), n)
       val = Object.new
-      class << val; self end.funcall(:define_method, :to_int) {
+      class << val; self end.send!(:define_method, :to_int) {
         s.close
         Socket::SO_TYPE
       }
@@ -34,7 +34,7 @@
     linger = [0, 0].pack("ii")
 
     val = Object.new
-    class << val; self end.funcall(:define_method, :to_str) {
+    class << val; self end.send!(:define_method, :to_str) {
       s.close
       linger
     }
@@ -47,7 +47,7 @@
     end
 
     val = Object.new
-    class << val; self end.funcall(:define_method, :to_int) {
+    class << val; self end.send!(:define_method, :to_int) {
       s.close
       Socket::SO_LINGER
     }
@@ -61,7 +61,7 @@
   def test_listen
     s = nil
     log = Object.new
-    class << log; self end.funcall(:define_method, :to_int) {
+    class << log; self end.send!(:define_method, :to_int) {
       s.close
       2
     }
Index: test/socket/test_udp.rb
===================================================================
--- test/socket/test_udp.rb	(revision 13243)
+++ test/socket/test_udp.rb	(revision 13244)
@@ -9,7 +9,7 @@
   def test_connect # [ruby-dev:25045]
     s = UDPSocket.new
     host = Object.new
-    class << host; self end.funcall(:define_method, :to_str) {
+    class << host; self end.send!(:define_method, :to_str) {
       s.close
       "127.0.0.1"
     }
@@ -21,7 +21,7 @@
   def test_bind # [ruby-dev:25057]
     s = UDPSocket.new
     host = Object.new
-    class << host; self end.funcall(:define_method, :to_str) {
+    class << host; self end.send!(:define_method, :to_str) {
       s.close
       "127.0.0.1"
     }
Index: test/pathname/test_pathname.rb
===================================================================
--- test/pathname/test_pathname.rb	(revision 13243)
+++ test/pathname/test_pathname.rb	(revision 13244)
@@ -12,7 +12,7 @@
   if RUBY_VERSION < "1.9"
     FUNCALL = :__send__
   else
-    FUNCALL = :funcall
+    FUNCALL = :send!
   end
 
   def self.define_assertion(name, &block)

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

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