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: e1897f65a009
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3d1ac5f19bc7
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Oct 9, 2015

  1. Copy the full SHA
    4d8986c View commit details
  2. Copy the full SHA
    3d1ac5f View commit details
8 changes: 0 additions & 8 deletions spec/truffle/tags/core/kernel/instance_variable_get_tags.txt

This file was deleted.

7 changes: 0 additions & 7 deletions spec/truffle/tags/core/kernel/instance_variable_set_tags.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -969,6 +969,11 @@ public InstanceVariableDefinedNode(RubyContext context, SourceSection sourceSect
super(context, sourceSection);
}

@CreateCast("name")
public RubyNode coerceToString(RubyNode name) {
return NameToJavaStringNodeGen.create(getContext(), getSourceSection(), name);
}

@TruffleBoundary
@Specialization
public boolean isInstanceVariableDefined(DynamicObject object, String name) {
Original file line number Diff line number Diff line change
@@ -69,6 +69,7 @@
import org.jruby.truffle.translator.TranslatorDriver;
import org.jruby.truffle.translator.TranslatorDriver.ParserContext;
import org.jruby.util.ByteList;
import org.jruby.util.IdUtil;
import org.jruby.util.StringSupport;

import java.io.File;
@@ -322,7 +323,7 @@ public void initialize() {
}

public static String checkInstanceVariableName(RubyContext context, String name, Node currentNode) {
if (!name.startsWith("@")) {
if (!IdUtil.isValidInstanceVariableName(name)) {
throw new RaiseException(context.getCoreLibrary().nameErrorInstanceNameNotAllowable(name, currentNode));
}