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

ruby-changes:16294

From: yugui <ko1@a...>
Date: Fri, 11 Jun 2010 01:25:29 +0900 (JST)
Subject: [ruby-changes:16294] Ruby:r28267 (ruby_1_9_2): merges r28101 from trunk into ruby_1_9_2.

yugui	2010-06-11 00:59:05 +0900 (Fri, 11 Jun 2010)

  New Revision: 28267

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

  Log:
    merges r28101 from trunk into ruby_1_9_2.
    --
    * insns.def (defined): respond_to_missing? may not be available
      (for BasicObject instances).

  Modified files:
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/insns.def

Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 28266)
+++ ruby_1_9_2/ChangeLog	(revision 28267)
@@ -1,3 +1,8 @@
+Mon May 31 02:17:54 2010  Yukihiro Matsumoto  <matz@r...>
+
+	* insns.def (defined): respond_to_missing? may not be available
+	  (for BasicObject instances).
+
 Sun May 30 21:48:07 2010  Yusuke Endoh  <mame@t...>
 
 	* lib/tempfile.rb (Tempfile#unlink): leave @data.  Assigning nil to
Index: ruby_1_9_2/insns.def
===================================================================
--- ruby_1_9_2/insns.def	(revision 28266)
+++ ruby_1_9_2/insns.def	(revision 28267)
@@ -799,8 +799,15 @@
 		}
 	    }
 	}
-	if (RTEST(rb_funcall(v, rb_intern("respond_to_missing?"), 2, obj, Qfalse)))
-	    expr_type = "method";
+	{
+	    VALUE args[2];
+	    VALUE r;
+
+	    args[0] = obj; args[1] = Qfalse;
+	    r = rb_check_funcall(v, rb_intern("respond_to_missing?"), 2, args);
+	    if (r != Qundef && RTEST(r)) 
+		expr_type = "method";
+	}
 	break;
       }
       case DEFINED_YIELD:

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

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