1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2019-12-27 17:36:07 +01:00
parent 74fdc1e60f
commit c74d30e795
5 changed files with 13 additions and 16 deletions

View file

@ -4,7 +4,10 @@ describe "LocalJumpError#reason" do
def get_me_a_return
Proc.new { return 42 }
end
-> { get_me_a_return.call }.should raise_error(LocalJumpError) { |e|
e.reason.should == :return
}
it "returns 'return' for a return" do
-> { get_me_a_return.call }.should raise_error(LocalJumpError) { |e|
e.reason.should == :return
}
end
end