mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
13 lines
196 B
Ruby
13 lines
196 B
Ruby
![]() |
require 'ripper.so'
|
||
|
|
||
|
class R < Ripper
|
||
|
def method_missing(mid, *args)
|
||
|
puts mid
|
||
|
args[0]
|
||
|
end
|
||
|
undef :warn
|
||
|
end
|
||
|
|
||
|
fname = (ARGV[0] || 'test/src_rb')
|
||
|
R.new(File.read(fname), fname, 1).parse
|