Skip to content

Commit

Permalink
Absent #is_a? etc., adding explicit nil check in Fixnum#== as a tempo…
Browse files Browse the repository at this point in the history
…rary hack to get the parser closer to self-hosted
  • Loading branch information
vidarh committed Sep 11, 2014
1 parent 814b520 commit 2f8ecb7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/core/fixnum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def <= other
end

def == other
if other.nil?
return false
end
%s(if (eq @value (callm other __get_raw)) true false)
end

Expand Down

0 comments on commit 2f8ecb7

Please sign in to comment.