Skip to content

Commit

Permalink
Showing 2 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -814,19 +814,6 @@ private void exec(RubyContext context, DynamicObject envAsHash, String[] command

}

@CoreMethod(names = "fork", isModuleFunction = true, rest = true, unsafe = UnsafeGroup.PROCESSES)
public abstract static class ForkNode extends CoreMethodArrayArgumentsNode {

@TruffleBoundary
@Specialization
public Object fork(Object[] args) {
final SourceSection sourceSection = getContext().getCallStack().getTopMostUserCallNode().getEncapsulatingSourceSection();
getContext().getJRubyRuntime().getWarnings().warn(IRubyWarnings.ID.TRUFFLE, sourceSection.getSource().getName(), sourceSection.getStartLine(), "Kernel#fork not implemented - defined to satisfy some metaprogramming in RubySpec");
return nil();
}

}

@CoreMethod(names = "freeze")
public abstract static class KernelFreezeNode extends CoreMethodArrayArgumentsNode {

5 changes: 5 additions & 0 deletions truffle/src/main/ruby/core/kernel.rb
Original file line number Diff line number Diff line change
@@ -673,4 +673,9 @@ def global_variables
end
module_function :global_variables

def fork
raise RubyTruffleError.new('Kernel#fork not implemented')
end
module_function :fork

end

0 comments on commit b254e25

Please sign in to comment.