Skip to content

Commit a9e377d

Browse files
committed
Don't assume T_FLOAT for flonums
For debugging.
1 parent 32c733f commit a9e377d

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

include/ruby/internal/globals.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,7 @@ rb_class_of(VALUE obj)
193193
return rb_cFloat;
194194
}
195195

196-
#if !RUBY_DEBUG
197-
RBIMPL_UNREACHABLE_RETURN(Qfalse);
198-
#else
199196
RUBY_ASSERT_FAIL("unexpected type");
200-
#endif
201197
}
202198

203199
#define CLASS_OF rb_class_of /**< @old{rb_class_of} */

include/ruby/internal/value_type.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ rb_type(VALUE obj)
246246
return RUBY_T_SYMBOL;
247247
}
248248
else {
249-
RBIMPL_ASSUME(RB_FLONUM_P(obj));
249+
RUBY_ASSERT_ALWAYS(RB_FLONUM_P(obj));
250250
return RUBY_T_FLOAT;
251251
}
252252
}

0 commit comments

Comments
 (0)