Skip to content

Commit

Permalink
Showing 5 changed files with 25 additions and 16 deletions.
3 changes: 3 additions & 0 deletions core/src/main/java/org/jruby/RubyObject.java
Original file line number Diff line number Diff line change
@@ -267,6 +267,9 @@ public IRubyObject allocate(Ruby runtime, RubyClass klass) {
klass.setAllocator(allocator);
klass.setReifiedClass(reified);

// invalidate metaclass so new allocator is picked up for specialized .new
klass.getMetaClass().invalidateCacheDescendants();

return allocator.allocate(runtime, klass);
}
};
7 changes: 0 additions & 7 deletions spec/truffle/tags/core/float/next_float_tags.txt

This file was deleted.

7 changes: 0 additions & 7 deletions spec/truffle/tags/core/float/prev_float_tags.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -605,6 +605,26 @@ public boolean nan(double value) {

}

@CoreMethod(names = "next_float")
public abstract static class NextFloatNode extends CoreMethodArrayArgumentsNode {

@Specialization
public double nextFloat(double value) {
return Math.nextAfter(value, Double.POSITIVE_INFINITY);
}

}

@CoreMethod(names = "prev_float")
public abstract static class PrevFloatNode extends CoreMethodArrayArgumentsNode {

@Specialization
public double prevFloat(double value) {
return Math.nextAfter(value, Double.NEGATIVE_INFINITY);
}

}

@CoreMethod(names = "round", optional = 1)
public abstract static class RoundNode extends CoreMethodArrayArgumentsNode {

Original file line number Diff line number Diff line change
@@ -148,7 +148,7 @@ private CallTarget getCExtLibRuby() {

try {
return parseSource(context.getSourceLoader().load(path));
} catch (IOException e) {
} catch (Exception e) {
throw new JavaException(e);
}
}
@@ -157,7 +157,7 @@ private CallTarget getCExtLibRuby() {
public CallTarget parseSource(Source source) {
try {
return context.getEnv().parse(source);
} catch (IOException e) {
} catch (Exception e) {
throw new JavaException(e);
}
}

0 comments on commit a6a9b98

Please sign in to comment.