summaryrefslogtreecommitdiff
path: root/spec/ruby/core/proc/shared/dup.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/proc/shared/dup.rb')
-rw-r--r--spec/ruby/core/proc/shared/dup.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/core/proc/shared/dup.rb b/spec/ruby/core/proc/shared/dup.rb
new file mode 100644
index 0000000000..fb6fff299d
--- /dev/null
+++ b/spec/ruby/core/proc/shared/dup.rb
@@ -0,0 +1,10 @@
+describe :proc_dup, shared: true do
+ it "returns a copy of self" do
+ a = lambda { "hello" }
+ b = a.send(@method)
+
+ a.should_not equal(b)
+
+ a.call.should == b.call
+ end
+end