summaryrefslogtreecommitdiff
path: root/sample/clone.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/clone.rb')
-rw-r--r--sample/clone.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/sample/clone.rb b/sample/clone.rb
new file mode 100644
index 0000000..6a752e8
--- /dev/null
+++ b/sample/clone.rb
@@ -0,0 +1,12 @@
+foo = Object.new
+def foo.test
+ print("test\n")
+end
+bar = foo.clone
+def bar.test2
+ print("test2\n")
+end
+bar.test2
+bar.test
+foo.test
+foo.test2