summaryrefslogtreecommitdiff
path: root/ext/ripper/test/list-called-events.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ripper/test/list-called-events.rb')
-rw-r--r--ext/ripper/test/list-called-events.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/ripper/test/list-called-events.rb b/ext/ripper/test/list-called-events.rb
new file mode 100644
index 0000000000..d799efc979
--- /dev/null
+++ b/ext/ripper/test/list-called-events.rb
@@ -0,0 +1,12 @@
+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