diff options
Diffstat (limited to 'spec/ruby/language/case_spec.rb')
-rw-r--r-- | spec/ruby/language/case_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/ruby/language/case_spec.rb b/spec/ruby/language/case_spec.rb index cb0e8150bf..25f5d0efc4 100644 --- a/spec/ruby/language/case_spec.rb +++ b/spec/ruby/language/case_spec.rb @@ -379,4 +379,11 @@ describe "The 'case'-construct with no target expression" do :called end.should == :called end + + it "accepts complex expressions within ()" do + case 'a' + when (raise if 2+2 == 3; /a/) + :called + end.should == :called + end end |