We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9de5a0 commit 4a8c2e9Copy full SHA for 4a8c2e9
src/main/java/org/truffleruby/core/cast/DurationToMillisecondsNode.java
@@ -67,10 +67,11 @@ protected long durationNil(Nil duration) {
67
protected Object duration(RubyDynamicObject duration,
68
@Cached DispatchNode durationToMilliseconds,
69
@Cached ToLongNode toLongNode) {
70
- return toLongNode.execute(durationToMilliseconds.call(
+ final Object milliseconds = durationToMilliseconds.call(
71
coreLibrary().truffleKernelOperationsModule,
72
"convert_duration_to_milliseconds",
73
- duration));
+ duration);
74
+ return validate(toLongNode.execute(milliseconds));
75
}
76
77
private long validate(long durationInMillis) {
0 commit comments