Permalink
Browse files

do not use TrueClass/FalseClass.new

  • Loading branch information...
1 parent a621f08 commit 344946233c7070d22f0b654a191ad20b0f92a1a0 @matz matz committed Jul 26, 2012
Showing with 8 additions and 8 deletions.
  1. +4 −4 test/t/false.rb
  2. +4 −4 test/t/true.rb
View
@@ -14,17 +14,17 @@
end
assert('FalseClass#&', '15.2.6.3.1') do
- not FalseClass.new.&(true) and not FalseClass.new.&(false)
+ not false.&(true) and not false.&(false)
end
assert('FalseClass#^', '15.2.6.3.2') do
- FalseClass.new.^(true) and not FalseClass.new.^(false)
+ false.^(true) and not false.^(false)
end
assert('FalseClass#to_s', '15.2.6.3.3') do
- FalseClass.new.to_s == 'false'
+ false.to_s == 'false'
end
assert('FalseClass#|', '15.2.6.3.4') do
- FalseClass.new.|(true) and not FalseClass.new.|(false)
+ false.|(true) and not false.|(false)
end
View
@@ -14,17 +14,17 @@
end
assert('TrueClass#&', '15.2.5.3.1') do
- TrueClass.new.&(true) and not TrueClass.new.&(false)
+ true.&(true) and not true.&(false)
end
assert('TrueClass#^', '15.2.5.3.2') do
- not TrueClass.new.^(true) and TrueClass.new.^(false)
+ not true.^(true) and true.^(false)
end
assert('TrueClass#to_s', '15.2.5.3.3') do
- TrueClass.new.to_s == 'true'
+ true.to_s == 'true'
end
assert('TrueClass#|', '15.2.5.3.4') do
- TrueClass.new.|(true) and TrueClass.new.|(false)
+ true.|(true) and true.|(false)
end

0 comments on commit 3449462

Please sign in to comment.