summaryrefslogtreecommitdiff
path: root/sample/evaldef.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/evaldef.rb')
-rw-r--r--sample/evaldef.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/sample/evaldef.rb b/sample/evaldef.rb
deleted file mode 100644
index 2cedd54999..0000000000
--- a/sample/evaldef.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# method definition by eval()
-# output:
-# bar
-# (eval):26: method `baz' not available for "#<foo: 0xbfc5c>"(foo)
-
-class Foo
- def foo
- eval("
-def baz
- print(\"bar\n\")
-end")
- end
-end
-
-class Bar : Foo
- def bar
- baz()
- end
-end
-
-f = Foo.new
-b = Bar.new
-
-b.foo
-b.bar
-f.baz