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

Commits on Feb 17, 2015

  1. [Truffle] Allow Rubinius.check_frozen to raise an exception.

    Prior to this change there would be an exception about calling the private method raise.
    nirvdrum committed Feb 17, 2015
    Copy the full SHA
    f570533 View commit details
  2. [Truffle] Slightly improved error message for frozen errors coming fr…

    …om Rubinius.check_frozen.
    nirvdrum committed Feb 17, 2015
    Copy the full SHA
    0af018d View commit details
  3. Copy the full SHA
    2a9bbb6 View commit details
Showing with 2 additions and 4 deletions.
  1. +0 −2 spec/truffle/tags/core/string/gsub_tags.txt
  2. +2 −2 truffle/src/main/java/org/jruby/truffle/translator/BodyTranslator.java
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/string/gsub_tags.txt
Original file line number Diff line number Diff line change
@@ -40,11 +40,9 @@ fails:String#gsub with pattern and block raises an Encoding::CompatibilityError
fails:String#gsub with pattern and block replaces the incompatible part properly even if the encodings are not compatible
fails:String#gsub! with pattern and replacement taints self if replacement is tainted
fails:String#gsub! with pattern and replacement untrusts self if replacement is untrusted
fails:String#gsub! with pattern and replacement raises a RuntimeError when self is frozen
fails:String#gsub! with pattern and block modifies self in place and returns self
fails:String#gsub! with pattern and block taints self if block's result is tainted
fails:String#gsub! with pattern and block untrusts self if block's result is untrusted
fails:String#gsub! with pattern and block raises a RuntimeError when self is frozen
fails:String#gsub! with pattern and block uses the compatible encoding if they are compatible
fails:String#gsub! with pattern and block raises an Encoding::CompatibilityError if the encodings are not compatible
fails:String#gsub! with pattern and block replaces the incompatible part properly even if the encodings are not compatible
Original file line number Diff line number Diff line change
@@ -537,9 +537,9 @@ private RubyNode translateRubiniusCheckFrozen(SourceSection sourceSection) {
final RubyNode constructException = new RubyCallNode(context, sourceSection, "new",
new ObjectLiteralNode(context, sourceSection, context.getCoreLibrary().getRuntimeErrorClass()),
null, false,
new StringLiteralNode(context, sourceSection, ByteList.create("can't modify frozen TODO")));
new StringLiteralNode(context, sourceSection, ByteList.create("FrozenError: can't modify frozen TODO")));

final RubyNode raise = new RubyCallNode(context, sourceSection, "raise", new SelfNode(context, sourceSection), null, false, constructException);
final RubyNode raise = new RubyCallNode(context, sourceSection, "raise", new SelfNode(context, sourceSection), null, false, true, false, constructException);

return new IfNode(context, sourceSection,
frozen,