⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (208 Bytes)
Bug #14719
» simple_delegator_on_boolean_with_simple_equals_override.rb
theirishpenguin (Declan McGrath)
, 04/27/2018 04:17 PM
#!/usr/bin/env ruby
class
BoldBool
<
SimpleDelegator
def
equal?
(
obj
)
true
end
end
false_bool
=
BoldBool
.
new
(
false
)
if
false_bool
puts
"I'm evaluated as true but I should be false."
end
« Previous
1
2
3
Next »
(3-3/3)
Loading...