Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 12c6ebfb1fab
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 92994e7cc7cb
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Dec 22, 2016

  1. Copy the full SHA
    0dfd7cb View commit details
  2. Copy the full SHA
    92994e7 View commit details
Showing with 20 additions and 0 deletions.
  1. +19 −0 spec/ruby/language/rescue_spec.rb
  2. +1 −0 spec/truffle/tags/language/rescue_tags.txt
19 changes: 19 additions & 0 deletions spec/ruby/language/rescue_spec.rb
Original file line number Diff line number Diff line change
@@ -232,4 +232,23 @@ class ArbitraryException < StandardError
end
end.should raise_error(Exception)
end

it "uses === to compare against rescued classes" do
rescuer = Class.new

def rescuer.===(exception)
true
end

begin
raise Exception
rescue rescuer
rescued = :success
rescue Exception
rescued = :failure
end

rescued.should == :success
end

end
1 change: 1 addition & 0 deletions spec/truffle/tags/language/rescue_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:The rescue keyword uses === to compare against rescued classes