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

ruby-changes:17778

From: tenderlove <ko1@a...>
Date: Mon, 15 Nov 2010 11:47:11 +0900 (JST)
Subject: [ruby-changes:17778] Ruby:r29789 (trunk): * lib/racc/parser.rb (do_parse, yyparse): using class eval to define

tenderlove	2010-11-15 11:47:05 +0900 (Mon, 15 Nov 2010)

  New Revision: 29789

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

  Log:
    * lib/racc/parser.rb (do_parse, yyparse): using class eval to define
      method and avoid __send__.

  Modified files:
    trunk/ChangeLog
    trunk/lib/racc/parser.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 29788)
+++ ChangeLog	(revision 29789)
@@ -1,3 +1,8 @@
+Mon Nov 15 08:36:12 2010  Aaron Patterson <aaron@t...>
+
+	* lib/racc/parser.rb (do_parse, yyparse): using class eval to define
+	  method and avoid __send__.
+
 Mon Nov 15 06:43:48 2010  Aaron Patterson <aaron@t...>
 
 	* etc/openssl/ossl_ssl.c (ossl_ssl_get_cert): raise exception if
Index: lib/racc/parser.rb
===================================================================
--- lib/racc/parser.rb	(revision 29788)
+++ lib/racc/parser.rb	(revision 29789)
@@ -30,10 +30,10 @@
 
   class Parser
 
-    Racc_Runtime_Version = '1.4.5'
+    Racc_Runtime_Version = '1.4.6'
     Racc_Runtime_Revision = %w$originalRevision: 1.8 $[1]
 
-    Racc_Runtime_Core_Version_R = '1.4.5'
+    Racc_Runtime_Core_Version_R = '1.4.6'
     Racc_Runtime_Core_Revision_R = %w$originalRevision: 1.8 $[1]
     begin
       require 'racc/cparse'
@@ -95,9 +95,11 @@
     ### do_parse
     ###
 
+    class_eval %{
     def do_parse
-      __send__(Racc_Main_Parsing_Routine, _racc_setup(), false)
+      #{Racc_Main_Parsing_Routine}(_racc_setup(), false)
     end
+    }
 
     def next_token
       raise NotImplementedError, "#{self.class}\#next_token is not defined"
@@ -147,9 +149,11 @@
     ### yyparse
     ###
 
+    class_eval %{
     def yyparse(recv, mid)
-      __send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), true)
+      #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), true)
     end
+    }
 
     def _racc_yyparse_rb(recv, mid, arg, c_debug)
       action_table, action_check, action_default, action_pointer,

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

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