Skip to content

Commit

Permalink
Merge pull request #1019 from AI-Mozi/add_spec_for_proc_dup
Browse files Browse the repository at this point in the history
Add spec for `Proc#dup`
  • Loading branch information
andrykonchin committed May 11, 2023
2 parents af03ec4 + 4f98b60 commit e19f670
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/proc/shared/dup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,12 @@

a.call.should == b.call
end

ruby_version_is "3.2" do
it "returns an instance of subclass" do
cl = Class.new(Proc)

cl.new{}.send(@method).class.should == cl
end
end
end

0 comments on commit e19f670

Please sign in to comment.