Skip to content

Instantly share code, notes, and snippets.

@dbrady
Created August 13, 2013 15:23
Show Gist options
  • Save dbrady/6222296 to your computer and use it in GitHub Desktop.
Save dbrady/6222296 to your computer and use it in GitHub Desktop.
Shouldn't this trigger a warning?
09:21:58 dbrady@orthanc:~ ruby-2.0.0-p247
∫ ruby -W4 temp.rb
true
09:22:05 dbrady@orthanc:~ ruby-2.0.0-p247
∫ cat temp.rb
class Ponk
def initialize(x)
@x = x
end
def new_x?
! !! !! !!(@x)
end
end
puts Ponk.new(nil).new_x?.inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment