class RKelly::JS::NaN

Class to represent Not A Number In Ruby NaN != NaN, but in JS, NaN == NaN

Public Instance Methods

+(o) click to toggle source
# File lib/rkelly/js/nan.rb, line 14
def +(o); self; end
-(o) click to toggle source
# File lib/rkelly/js/nan.rb, line 15
def -(o); self; end
==(other) click to toggle source
# File lib/rkelly/js/nan.rb, line 6
def ==(other)
  other.respond_to?(:nan?) && other.nan?
end
nan?() click to toggle source
# File lib/rkelly/js/nan.rb, line 10
def nan?
  true
end