summaryrefslogtreecommitdiff
path: root/lib/racc
diff options
context:
space:
mode:
authorAaron Patterson <[email protected]>2021-04-27 11:49:20 -0700
committerHiroshi SHIBATA <[email protected]>2021-06-25 17:26:27 +0900
commitb036a44e57a662d94ba2e67512f6d390b1e36b45 ()
treebaa249f299edf2e555fe79817f93434fe50c8061 /lib/racc
parent7641a83d1f314c3c9400f733cd758164de4fa6c1 (diff)
[ruby/racc] Remove Object monkey
I don't think we need this monkey anymore, so lets remove it! https://.com/ruby/racc/commit/464485e912
-rw-r--r--lib/racc/statetransitiontable.rb10
1 files changed, 2 insertions, 8 deletions
@@ -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)
else
- c.funcall(: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)