Skip to content

Commit

Permalink
Revert "Reapply 5441086 lost in later compiler optz commit."
Browse files Browse the repository at this point in the history
This reverts commit 18849e2.
  • Loading branch information
headius committed Apr 25, 2018
1 parent a21440b commit 5a8d17b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/RubyString.java
Expand Up @@ -1141,9 +1141,9 @@ private IRubyObject op_equalCommon(ThreadContext context, IRubyObject other) {
return sites(context).equals.call(context, this, other, this).isTrue() ? runtime.getTrue() : runtime.getFalse();
}

@JRubyMethod(name = "-@") // -'foo' returns deduplicated (interned) string
@JRubyMethod(name = "-@") // -'foo' returns frozen string
public final IRubyObject minus_at(ThreadContext context) {
return context.runtime.freezeAndDedupString(this);
return isFrozen() ? this : context.runtime.freezeAndDedupString(this);
}

@JRubyMethod(name = "+@") // +'foo' returns modifiable string
Expand Down

0 comments on commit 5a8d17b

Please sign in to comment.