Skip to content

Commit

Permalink
[Truffle] Adding coerce to Fixnum#<=> fallback specialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjfish committed Apr 8, 2015
1 parent 5c8702a commit f4a4d68
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -907,12 +907,12 @@ public int compare(long a, RubyBignum b) {
}

@Specialization(guards = {
"!isInteger(arguments[1])",
"!isLong(arguments[1])",
"!isDouble(arguments[1])",
"!isRubyBignum(arguments[1])"})
public RubyNilClass compare(Object a, Object b) {
return nil();
"!isInteger(arguments[1])",
"!isLong(arguments[1])",
"!isDouble(arguments[1])",
"!isRubyBignum(arguments[1])"})
public Object compare(VirtualFrame frame, Object a, Object b) {
return ruby(frame, "begin; b, a = math_coerce(other, :compare_error); a <=> b; rescue ArgumentError; nil; end", "other", b);
}

}
Expand Down

0 comments on commit f4a4d68

Please sign in to comment.