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

Commits on Jun 1, 2015

  1. Copy the full SHA
    33b0efc View commit details
  2. Copy the full SHA
    0ee86ae View commit details
  3. Take 2 on dedup'ing in hashes. Since we only dedup if actual String a…

    …nd not subclasses then the world will be happy
    enebo committed Jun 1, 2015
    Copy the full SHA
    ddc07f7 View commit details
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
@@ -4740,7 +4740,7 @@ public RubyString getThreadStatus(RubyThread.Status status) {
* @return the freeze-duped version of the string
*/
public RubyString freezeAndDedupString(RubyString string) {
if (string.getMetaClass() == stringClass) {
if (string.getMetaClass() != stringClass) {
// never cache a non-natural String
RubyString duped = string.strDup(this);
duped.setFrozen(true);
10 changes: 2 additions & 8 deletions core/src/main/java/org/jruby/RubyHash.java
Original file line number Diff line number Diff line change
@@ -1014,10 +1014,7 @@ protected void op_asetForString(Ruby runtime, RubyString key, IRubyObject value)
entry.value = value;
} else {
checkIterating();
if (!key.isFrozen()) {
key = key.strDup(runtime, key.getMetaClass().getRealClass());
key.setFrozen(true);
}
if (!key.isFrozen()) key = runtime.freezeAndDedupString(key);
internalPut(key, value, false);
}
}
@@ -1028,10 +1025,7 @@ protected void op_asetSmallForString(Ruby runtime, RubyString key, IRubyObject v
entry.value = value;
} else {
checkIterating();
if (!key.isFrozen()) {
key = key.strDup(runtime, key.getMetaClass().getRealClass());
key.setFrozen(true);
}
if (!key.isFrozen()) key = runtime.freezeAndDedupString(key);
internalPutSmall(key, value, false);
}
}
1 change: 0 additions & 1 deletion test/mri/excludes/TestDefined.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
exclude :test_autoloaded_noload, "needs investigation"
exclude :test_autoloaded_subclass, "needs investigation"
exclude :test_defined, "needs investigation"
exclude :test_defined_impl_specific, "needs investigation"
1 change: 0 additions & 1 deletion test/mri/excludes/TestHash.rb
Original file line number Diff line number Diff line change
@@ -14,4 +14,3 @@
exclude :test_reject, "needs investigation"
exclude :test_shift_none, "needs investigation"
exclude :test_AREF_fstring_key, "Depends on MRI-specific GC.stat key"
exclude :test_ASET_fstring_key, "neeeds investigation"
1 change: 0 additions & 1 deletion test/mri/excludes/TestHash/TestSubHash.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
exclude :test_AREF_fstring_key, "Depends on MRI-specific GC.stat key"
exclude :test_ASET_fstring_key, "needs investigation"