summaryrefslogtreecommitdiff
path: root/lib/racc
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2021-04-27 11:49:20 -0700
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-06-25 17:26:27 +0900
commitb036a44e57a662d94ba2e67512f6d390b1e36b45 (patch)
treebaa249f299edf2e555fe79817f93434fe50c8061 /lib/racc
parent7641a83d1f314c3c9400f733cd758164de4fa6c1 (diff)
downloadruby-b036a44e57a662d94ba2e67512f6d390b1e36b45.tar.gz
[ruby/racc] Remove Object monkey patch
I don't think we need this monkey patch anymore, so lets remove it! https://github.com/ruby/racc/commit/464485e912
Diffstat (limited to 'lib/racc')
-rw-r--r--lib/racc/statetransitiontable.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb
index 4252ba0184..4d54287258 100644
--- a/lib/racc/statetransitiontable.rb
+++ b/lib/racc/statetransitiontable.rb
@@ -12,12 +12,6 @@
require 'racc/parser'
-unless Object.method_defined?(:funcall)
- class Object
- alias funcall __send__
- end
-end
-
module Racc
StateTransitionTable = Struct.new(:action_table,
@@ -300,9 +294,9 @@ module Racc
c.module_eval "def _reduce_none(vals, vstack) vals[0] end"
@grammar.each do |rule|
if rule.action.empty?
- c.funcall(:alias_method, "_reduce_#{rule.ident}", :_reduce_none)
+ c.alias_method("_reduce_#{rule.ident}", :_reduce_none)
else
- c.funcall(:define_method, "_racc_action_#{rule.ident}", &rule.action.proc)
+ c.define_method("_racc_action_#{rule.ident}", &rule.action.proc)
c.module_eval(<<-End, __FILE__, __LINE__ + 1)
def _reduce_#{rule.ident}(vals, vstack)
_racc_action_#{rule.ident}(*vals)