Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 703c6c973a56
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8370e021837b
Choose a head ref
  • 2 commits
  • 63 files changed
  • 1 contributor

Commits on May 29, 2015

  1. Copy the full SHA
    4757c64 View commit details
  2. Copy the full SHA
    8370e02 View commit details
Showing with 659 additions and 646 deletions.
  1. +31 −2 truffle/src/main/java/org/jruby/truffle/nodes/RubyNode.java
  2. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/cast/SplatCastNode.java
  3. +3 −2 truffle/src/main/java/org/jruby/truffle/nodes/constants/ReadConstantNode.java
  4. +3 −2 truffle/src/main/java/org/jruby/truffle/nodes/control/TraceNode.java
  5. +3 −3 truffle/src/main/java/org/jruby/truffle/nodes/core/BigDecimalNodes.java
  6. +2 −3 truffle/src/main/java/org/jruby/truffle/nodes/core/BignumNodes.java
  7. +2 −2 truffle/src/main/java/org/jruby/truffle/nodes/core/EncodingConverterNodes.java
  8. +9 −10 truffle/src/main/java/org/jruby/truffle/nodes/core/EncodingNodes.java
  9. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/FloatNodes.java
  10. +4 −4 truffle/src/main/java/org/jruby/truffle/nodes/core/KernelNodes.java
  11. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/LoadRequiredLibrariesNode.java
  12. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/MatchDataNodes.java
  13. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/MethodNodes.java
  14. +3 −3 truffle/src/main/java/org/jruby/truffle/nodes/core/ModuleNodes.java
  15. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/ProcNodes.java
  16. +5 −5 truffle/src/main/java/org/jruby/truffle/nodes/core/RegexpNodes.java
  17. +46 −32 truffle/src/main/java/org/jruby/truffle/nodes/core/StringNodes.java
  18. +2 −2 truffle/src/main/java/org/jruby/truffle/nodes/core/SymbolNodes.java
  19. +7 −14 truffle/src/main/java/org/jruby/truffle/nodes/core/ThreadBacktraceLocationNodes.java
  20. +2 −2 truffle/src/main/java/org/jruby/truffle/nodes/core/ThreadNodes.java
  21. +7 −7 truffle/src/main/java/org/jruby/truffle/nodes/core/TrufflePrimitiveNodes.java
  22. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/UnboundMethodNodes.java
  23. +4 −5 truffle/src/main/java/org/jruby/truffle/nodes/core/array/ArrayNodes.java
  24. +5 −5 truffle/src/main/java/org/jruby/truffle/nodes/core/fixnum/FixnumNodes.java
  25. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/defined/DefinedWrapperNode.java
  26. +3 −2 truffle/src/main/java/org/jruby/truffle/nodes/dispatch/RubyCallNode.java
  27. +3 −3 truffle/src/main/java/org/jruby/truffle/nodes/ext/DigestNodes.java
  28. +3 −10 truffle/src/main/java/org/jruby/truffle/nodes/ext/ZlibNodes.java
  29. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/globals/ReadLastBacktraceNode.java
  30. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/globals/ReadMatchReferenceNode.java
  31. +2 −2 truffle/src/main/java/org/jruby/truffle/nodes/interop/IndexLabelToRubyNode.java
  32. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/literal/StringLiteralNode.java
  33. +3 −2 truffle/src/main/java/org/jruby/truffle/nodes/locals/ReadDeclarationVariableNode.java
  34. +3 −2 truffle/src/main/java/org/jruby/truffle/nodes/locals/ReadLocalVariableNode.java
  35. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/locals/WriteDeclarationVariableNode.java
  36. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/locals/WriteLocalVariableNode.java
  37. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/objects/ReadClassVariableNode.java
  38. +4 −3 truffle/src/main/java/org/jruby/truffle/nodes/objects/ReadInstanceVariableNode.java
  39. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/objects/SelfNode.java
  40. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/objects/WriteClassVariableNode.java
  41. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/objects/WriteInstanceVariableNode.java
  42. +4 −4 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/DirPrimitiveNodes.java
  43. +9 −9 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/EncodingConverterPrimitiveNodes.java
  44. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/FloatPrimitiveNodes.java
  45. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/IOPrimitiveNodes.java
  46. +4 −4 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/PointerPrimitiveNodes.java
  47. +2 −2 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/PosixNodes.java
  48. +12 −12 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/StringPrimitiveNodes.java
  49. +5 −5 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/TimePrimitiveNodes.java
  50. +4 −8 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/VMPrimitiveNodes.java
  51. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/supercall/AbstractGeneralSuperCallNode.java
  52. +3 −2 truffle/src/main/java/org/jruby/truffle/nodes/time/ReadTimeZoneNode.java
  53. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/yield/YieldNode.java
  54. +7 −51 truffle/src/main/java/org/jruby/truffle/runtime/RubyContext.java
  55. +40 −40 truffle/src/main/java/org/jruby/truffle/runtime/core/CoreLibrary.java
  56. +3 −2 truffle/src/main/java/org/jruby/truffle/runtime/core/RubyException.java
  57. +8 −8 truffle/src/main/java/org/jruby/truffle/runtime/core/RubyRegexp.java
  58. +2 −1 truffle/src/main/java/org/jruby/truffle/runtime/core/RubySymbol.java
  59. +171 −170 truffle/src/main/java/org/jruby/truffle/runtime/rubinius/DarwinRubiniusConfiguration.java
  60. +10 −4 truffle/src/main/java/org/jruby/truffle/runtime/rubinius/DefaultRubiniusConfiguration.java
  61. +173 −172 truffle/src/main/java/org/jruby/truffle/runtime/rubinius/LinuxRubiniusConfiguration.java
  62. +2 −0 truffle/src/main/java/org/jruby/truffle/runtime/rubinius/RubiniusConfiguration.java
  63. +5 −4 truffle/src/main/java/org/jruby/truffle/runtime/subsystems/FeatureManager.java
33 changes: 31 additions & 2 deletions truffle/src/main/java/org/jruby/truffle/nodes/RubyNode.java
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@
*/
package org.jruby.truffle.nodes;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.Truffle;
import com.oracle.truffle.api.dsl.ImportStatic;
@@ -24,13 +23,19 @@
import jnr.ffi.provider.MemoryManager;
import jnr.posix.POSIX;

import org.jcodings.Encoding;
import org.jcodings.specific.USASCIIEncoding;
import org.jruby.truffle.nodes.core.StringNodes;
import org.jruby.truffle.nodes.core.array.ArrayNodes;
import org.jruby.truffle.nodes.instrument.RubyWrapperNode;
import org.jruby.truffle.runtime.RubyArguments;
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.NotProvided;
import org.jruby.truffle.runtime.core.*;
import org.jruby.truffle.runtime.sockets.NativeSockets;
import org.jruby.util.ByteList;

import java.nio.ByteBuffer;

@TypeSystemReference(RubyTypes.class)
@ImportStatic(RubyGuards.class)
@@ -56,7 +61,7 @@ public RubyNode(RubyContext context, SourceSection sourceSection) {
public abstract Object execute(VirtualFrame frame);

public Object isDefined(VirtualFrame frame) {
return getContext().makeString("expression");
return StringNodes.createString(getContext().getCoreLibrary().getStringClass(), "expression");
}

// Execute without returning the result
@@ -243,6 +248,30 @@ protected RubyBasicObject nil() {
return getContext().getCoreLibrary().getNilObject();
}

protected RubyString createEmptyString() {
return StringNodes.createEmptyString(getContext().getCoreLibrary().getStringClass());
}

protected RubyString createString(String string) {
return StringNodes.createString(getContext().getCoreLibrary().getStringClass(), string);
}

protected RubyString createString(String string, Encoding encoding) {
return StringNodes.createString(getContext().getCoreLibrary().getStringClass(), string, encoding);
}

protected RubyString createString(byte[] bytes) {
return StringNodes.createString(getContext().getCoreLibrary().getStringClass(), bytes);
}

protected RubyString createString(ByteBuffer bytes) {
return StringNodes.createString(getContext().getCoreLibrary().getStringClass(), bytes);
}

protected RubyString createString(ByteList bytes) {
return StringNodes.createString(getContext().getCoreLibrary().getStringClass(), bytes);
}

protected RubyArray createEmptyArray() {
return ArrayNodes.createEmptyArray(getContext().getCoreLibrary().getArrayClass());
}
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.nodes.core.StringNodes;
import org.jruby.truffle.nodes.core.array.ArrayDupNode;
import org.jruby.truffle.nodes.core.array.ArrayDupNodeGen;
import org.jruby.truffle.nodes.core.array.ArrayNodes;
@@ -94,7 +95,7 @@ public RubyArray splat(VirtualFrame frame, Object object) {
}

// MRI tries to call dynamic respond_to? here.
Object respondToResult = respondToToA.call(frame, object, "respond_to?", null, getContext().makeString(method), true);
Object respondToResult = respondToToA.call(frame, object, "respond_to?", null, createString(method), true);
if (respondToResult != DispatchNode.MISSING && respondToCast.executeBoolean(frame, respondToResult)) {
final Object array = toA.call(frame, object, method, null);

Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
package org.jruby.truffle.nodes.constants;

import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.nodes.core.StringNodes;
import org.jruby.truffle.nodes.literal.LiteralNode;
import org.jruby.truffle.runtime.LexicalScope;
import org.jruby.truffle.runtime.RubyConstant;
@@ -47,7 +48,7 @@ public Object isDefined(VirtualFrame frame) {

if (name.equals("Encoding")) {
// Work-around so I don't have to load the iconv library - runners/formatters/junit.rb.
return context.makeString("constant");
return createString("constant");
}

final Object receiverObject;
@@ -82,7 +83,7 @@ public Object isDefined(VirtualFrame frame) {
if (constant == null) {
return nil();
} else {
return context.makeString("constant");
return createString("constant");
}
}

Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
import com.oracle.truffle.api.nodes.InvalidAssumptionException;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.nodes.core.StringNodes;
import org.jruby.truffle.runtime.RubyArguments;
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.core.RubyBinding;
@@ -41,8 +42,8 @@ public TraceNode(RubyContext context, SourceSection sourceSection) {
traceAssumption = context.getTraceManager().getTraceAssumption();
traceFunc = null;
callNode = null;
event = context.makeString("line");
file = context.makeString(sourceSection.getSource().getName());
event = createString("line");
file = createString(sourceSection.getSource().getName());
line = sourceSection.getStartLine();
}

Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@
*/
package org.jruby.truffle.nodes.core;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.frame.VirtualFrame;
@@ -478,9 +477,10 @@ public RubyString toS(RubyBasicObject value) {
final BigDecimal bigDecimal = getBigDecimalValue(value);
final boolean negative = bigDecimal.signum() == -1;

return getContext().makeString((negative ? "-" : "") + "0." +
String string = (negative ? "-" : "") + "0." +
(negative ? bigDecimal.unscaledValue().toString().substring(1) : bigDecimal.unscaledValue()) +
"E" + (bigDecimal.precision() - bigDecimal.scale()));
"E" + (bigDecimal.precision() - bigDecimal.scale());
return createString(string);
}

}
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@

import org.jruby.truffle.nodes.cast.BooleanCastNode;
import org.jruby.truffle.nodes.cast.BooleanCastNodeGen;
import org.jruby.truffle.nodes.core.array.ArrayNodes;
import org.jruby.truffle.nodes.dispatch.CallDispatchHeadNode;
import org.jruby.truffle.nodes.dispatch.DispatchHeadNodeFactory;
import org.jruby.truffle.runtime.RubyContext;
@@ -663,7 +662,7 @@ public ToSNode(RubyContext context, SourceSection sourceSection) {
@TruffleBoundary
@Specialization
public RubyString toS(RubyBasicObject value, NotProvided base) {
return getContext().makeString(getBigIntegerValue(value).toString());
return createString(getBigIntegerValue(value).toString());
}

@TruffleBoundary
@@ -674,7 +673,7 @@ public RubyString toS(RubyBasicObject value, int base) {
throw new RaiseException(getContext().getCoreLibrary().argumentErrorInvalidRadix(base, this));
}

return getContext().makeString(getBigIntegerValue(value).toString(base));
return createString(getBigIntegerValue(value).toString(base));
}

}
Original file line number Diff line number Diff line change
@@ -137,11 +137,11 @@ public Object transcodingMap(VirtualFrame frame) {
final TranscoderDB.Entry e = destinationEntry.value;

if (key == null) {
final Object upcased = upcaseNode.call(frame, getContext().makeString(new ByteList(e.getSource())), "upcase", null);
final Object upcased = upcaseNode.call(frame, createString(new ByteList(e.getSource())), "upcase", null);
key = toSymNode.call(frame, upcased, "to_sym", null);
}

final Object upcasedLookupTableKey = upcaseNode.call(frame, getContext().makeString(new ByteList(e.getDestination())), "upcase", null);
final Object upcasedLookupTableKey = upcaseNode.call(frame, createString(new ByteList(e.getDestination())), "upcase", null);
final Object lookupTableKey = toSymNode.call(frame, upcasedLookupTableKey, "to_sym", null);
final Object lookupTableValue = newTranscodingNode.call(frame, getContext().getCoreLibrary().getTranscodingClass(), "create", null, key, lookupTableKey);
lookupTableWriteNode.call(frame, value, "[]=", null, lookupTableKey, lookupTableValue);
Original file line number Diff line number Diff line change
@@ -21,7 +21,6 @@
import org.jcodings.util.Hash;
import org.jruby.truffle.nodes.coerce.ToStrNode;
import org.jruby.truffle.nodes.coerce.ToStrNodeGen;
import org.jruby.truffle.nodes.core.array.ArrayNodes;
import org.jruby.truffle.nodes.dispatch.CallDispatchHeadNode;
import org.jruby.truffle.nodes.dispatch.DispatchHeadNodeFactory;
import org.jruby.truffle.runtime.RubyContext;
@@ -295,7 +294,7 @@ public LocaleCharacterMapNode(RubyContext context, SourceSection sourceSection)
public RubyString localeCharacterMap() {
CompilerDirectives.transferToInterpreter();
final ByteList name = new ByteList(getContext().getRuntime().getEncodingService().getLocaleEncoding().getName());
return getContext().makeString(name);
return createString(name);
}
}

@@ -339,7 +338,7 @@ public Object encodingMap(VirtualFrame frame) {

final RubyEncoding[] encodings = RubyEncoding.cloneEncodingList();
for (int i = 0; i < encodings.length; i++) {
final Object upcased = upcaseNode.call(frame, getContext().makeString(encodings[i].getName()), "upcase", null);
final Object upcased = upcaseNode.call(frame, createString(encodings[i].getName()), "upcase", null);
final Object key = toSymNode.call(frame, upcased, "to_sym", null);
final Object value = newTupleNode.call(frame, getContext().getCoreLibrary().getTupleClass(), "create", null, nil(), i);

@@ -351,9 +350,9 @@ public Object encodingMap(VirtualFrame frame) {
final CaseInsensitiveBytesHash.CaseInsensitiveBytesHashEntry<EncodingDB.Entry> e =
((CaseInsensitiveBytesHash.CaseInsensitiveBytesHashEntry<EncodingDB.Entry>)i.next());

final Object upcased = upcaseNode.call(frame, getContext().makeString(new ByteList(e.bytes, e.p, e.end - e.p)), "upcase", null);
final Object upcased = upcaseNode.call(frame, createString(new ByteList(e.bytes, e.p, e.end - e.p)), "upcase", null);
final Object key = toSymNode.call(frame, upcased, "to_sym", null);
final RubyString alias = getContext().makeString(new ByteList(e.bytes, e.p, e.end - e.p));
final RubyString alias = createString(new ByteList(e.bytes, e.p, e.end - e.p));
final int index = e.value.getIndex();


@@ -362,19 +361,19 @@ public Object encodingMap(VirtualFrame frame) {
}

final Encoding defaultInternalEncoding = getContext().getRuntime().getDefaultInternalEncoding();
final Object internalTuple = getContext().makeTuple(frame, newTupleNode, getContext().makeString("internal"), indexLookup(encodings, defaultInternalEncoding));
final Object internalTuple = getContext().makeTuple(frame, newTupleNode, createString("internal"), indexLookup(encodings, defaultInternalEncoding));
lookupTableWriteNode.call(frame, ret, "[]=", null, getContext().getSymbol("INTERNAL"), internalTuple);

final Encoding defaultExternalEncoding = getContext().getRuntime().getDefaultExternalEncoding();
final Object externalTuple = getContext().makeTuple(frame, newTupleNode, getContext().makeString("external"), indexLookup(encodings, defaultExternalEncoding));
final Object externalTuple = getContext().makeTuple(frame, newTupleNode, createString("external"), indexLookup(encodings, defaultExternalEncoding));
lookupTableWriteNode.call(frame, ret, "[]=", null, getContext().getSymbol("EXTERNAL"), externalTuple);

final Encoding localeEncoding = getContext().getRuntime().getEncodingService().getLocaleEncoding();
final Object localeTuple = getContext().makeTuple(frame, newTupleNode, getContext().makeString("locale"), indexLookup(encodings, localeEncoding));
final Object localeTuple = getContext().makeTuple(frame, newTupleNode, createString("locale"), indexLookup(encodings, localeEncoding));
lookupTableWriteNode.call(frame, ret, "[]=", null, getContext().getSymbol("LOCALE"), localeTuple);

final Encoding filesystemEncoding = getContext().getRuntime().getEncodingService().getLocaleEncoding();
final Object filesystemTuple = getContext().makeTuple(frame, newTupleNode, getContext().makeString("filesystem"), indexLookup(encodings, filesystemEncoding));
final Object filesystemTuple = getContext().makeTuple(frame, newTupleNode, createString("filesystem"), indexLookup(encodings, filesystemEncoding));
lookupTableWriteNode.call(frame, ret, "[]=", null, getContext().getSymbol("FILESYSTEM"), filesystemTuple);

return ret;
@@ -409,7 +408,7 @@ public ToSNode(RubyContext context, SourceSection sourceSection) {
public RubyString toS(RubyEncoding encoding) {
final ByteList name = encoding.getName().dup();
name.setEncoding(ASCIIEncoding.INSTANCE);
return getContext().makeString(name);
return createString(name);
}
}

Original file line number Diff line number Diff line change
@@ -666,7 +666,7 @@ public ToSNode(RubyContext context, SourceSection sourceSection) {
@TruffleBoundary
@Specialization
public RubyString toS(double value) {
return getContext().makeString(Double.toString(value));
return createString(Double.toString(value));
}

}
Original file line number Diff line number Diff line change
@@ -119,7 +119,7 @@ public RubyString backtick(RubyString command) {
}

// TODO (nirvdrum 10-Mar-15) This should be using the default external encoding, rather than hard-coded to UTF-8.
return context.makeString(resultBuilder.toString(), RubyEncoding.getEncoding("UTF-8").getEncoding());
return createString(resultBuilder.toString(), RubyEncoding.getEncoding("UTF-8").getEncoding());
}

}
@@ -699,7 +699,7 @@ public String block() throws InterruptedException {
}
});

final RubyString rubyLine = getContext().makeString(line);
final RubyString rubyLine = createString(line);

// Set the local variable $_ in the caller

@@ -1731,7 +1731,7 @@ private RuntimeException handleException(PackException exception) {
}

private RubyString finishFormat(ByteList format, PackResult result) {
final RubyString string = getContext().makeString(new ByteList(result.getOutput(), 0, result.getOutputLength()));
final RubyString string = createString(new ByteList(result.getOutput(), 0, result.getOutputLength()));

if (format.length() == 0) {
StringNodes.forceEncoding(string, USASCIIEncoding.INSTANCE);
@@ -1913,7 +1913,7 @@ public RubyString toS(VirtualFrame frame, Object self) {
Object id = objectIDNode.executeObjectID(frame, self);
String hexID = toHexStringNode.executeToHexString(frame, id);

return getContext().makeString("#<" + className + ":0x" + hexID + ">");
return createString("#<" + className + ":0x" + hexID + ">");
}

}
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ public Object execute(VirtualFrame frame) {
Collection<String> requiredLibraries = getContext().getRuntime().getInstanceConfig().getRequiredLibraries();

for (String requiredLibrary : requiredLibraries) {
requireNode.call(frame, self, "require", null, getContext().makeString(requiredLibrary));
requireNode.call(frame, self, "require", null, createString(requiredLibrary));
}

return nil();
Original file line number Diff line number Diff line change
@@ -258,7 +258,7 @@ public RubyString toS(RubyMatchData matchData) {
CompilerDirectives.transferToInterpreter();

final ByteList bytes = matchData.getGlobal().getByteList().dup();
return getContext().makeString(bytes);
return createString(bytes);
}
}

Original file line number Diff line number Diff line change
@@ -234,7 +234,7 @@ public Object sourceLocation(RubyBasicObject method) {
if (sourceSection instanceof NullSourceSection) {
return nil();
} else {
RubyString file = getContext().makeString(sourceSection.getSource().getName());
RubyString file = createString(sourceSection.getSource().getName());
return ArrayNodes.fromObjects(getContext().getCoreLibrary().getArrayClass(),
file, sourceSection.getStartLine());
}
Original file line number Diff line number Diff line change
@@ -1258,7 +1258,7 @@ public Object name(RubyModule module) {
return nil();
}

return getContext().makeString(module.getName());
return createString(module.getName());
}
}

@@ -1765,7 +1765,7 @@ public ToSNode(RubyContext context, SourceSection sourceSection) {
public RubyString toS(RubyModule module) {
CompilerDirectives.transferToInterpreter();

return getContext().makeString(module.getName());
return createString(module.getName());
}

}
@@ -1816,7 +1816,7 @@ public RubyString userHome(RubyString uname) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("user " + uname.toString() + " does not exist", this));
}
return getContext().makeString(passwd.getHome());
return createString(passwd.getHome());
}

}
Original file line number Diff line number Diff line change
@@ -189,7 +189,7 @@ public Object sourceLocation(RubyProc proc) {
if (sourceSection instanceof NullSourceSection) {
return nil();
} else {
RubyString file = getContext().makeString(sourceSection.getSource().getName());
RubyString file = createString(sourceSection.getSource().getName());
return ArrayNodes.fromObjects(getContext().getCoreLibrary().getArrayClass(),
file, sourceSection.getStartLine());
}
Loading