summaryrefslogtreecommitdiff
path: root/spec/ruby/language/precedence_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/language/precedence_spec.rb')
-rw-r--r--spec/ruby/language/precedence_spec.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/ruby/language/precedence_spec.rb b/spec/ruby/language/precedence_spec.rb
index 2dcb997..19edaf2 100644
--- a/spec/ruby/language/precedence_spec.rb
+++ b/spec/ruby/language/precedence_spec.rb
@@ -301,8 +301,14 @@ describe "Operators" do
from = 1
to = 2
# These are Range instances, not flip-flop
- (from..to ? 3 : 4).should == 3
- (from...to ? 3 : 4).should == 3
+ @verbose = $VERBOSE
+ $VERBOSE = nil
+ begin
+ (eval("from..to") ? 3 : 4).should == 3
+ (eval("from...to") ? 3 : 4).should == 3
+ ensure
+ $VERBOSE = @verbose
+ end
end
it "? : is right-associative" do