File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/main/java/org/truffleruby/core/cast Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ protected long coerceNil(Nil value) {
108
108
coreExceptions ().typeError ("no implicit conversion from nil to integer" , this ));
109
109
}
110
110
111
- @ Specialization (guards = { "!isRubyInteger(object)" , "!isNil(object)" })
111
+ @ Specialization (guards = { "!isRubyInteger(object)" , "!isDouble(object)" , "! isNil(object)" })
112
112
protected int coerceObject (Object object ,
113
113
@ Cached CallDispatchHeadNode toIntNode ,
114
114
@ Cached ToIntNode fitNode ) {
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ protected long coerceNil(Nil nil) {
78
78
coreExceptions ().typeError ("no implicit conversion from nil to integer" , this ));
79
79
}
80
80
81
- @ Specialization (guards = { "!isRubyInteger(object)" , "!isNil(object)" })
81
+ @ Specialization (guards = { "!isRubyInteger(object)" , "!isDouble(object)" , "! isNil(object)" })
82
82
protected long coerceObject (Object object ,
83
83
@ Cached CallDispatchHeadNode toIntNode ,
84
84
@ Cached ToLongNode fitNode ) {
You can’t perform that action at this time.
0 commit comments