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

Commits on Mar 5, 2015

  1. Copy the full SHA
    ba375dd View commit details
  2. Copy the full SHA
    62c28a6 View commit details
  3. [Truffle] Hash#length

    chrisseaton committed Mar 5, 2015
    Copy the full SHA
    3e73cfd View commit details
  4. [Truffle] Hash#hash

    chrisseaton committed Mar 5, 2015
    Copy the full SHA
    d550ee7 View commit details
  5. [Truffle] Hash#size

    chrisseaton committed Mar 5, 2015
    Copy the full SHA
    3bba907 View commit details
  6. [Truffle] Hash#inspect

    chrisseaton committed Mar 5, 2015
    Copy the full SHA
    45e5ff5 View commit details
  7. Copy the full SHA
    5bc6093 View commit details
Showing with 180 additions and 192 deletions.
  1. +0 −2 spec/truffle/tags/core/hash/clear_tags.txt
  2. +0 −9 spec/truffle/tags/core/hash/constructor_tags.txt
  3. +1 −9 spec/truffle/tags/core/hash/default_proc_tags.txt
  4. +0 −4 spec/truffle/tags/core/hash/default_tags.txt
  5. +0 −2 spec/truffle/tags/core/hash/delete_tags.txt
  6. +0 −7 spec/truffle/tags/core/hash/each_pair_tags.txt
  7. +0 −6 spec/truffle/tags/core/hash/element_reference_tags.txt
  8. +0 −2 spec/truffle/tags/core/hash/element_set_tags.txt
  9. +0 −1 spec/truffle/tags/core/hash/empty_tags.txt
  10. +0 −4 spec/truffle/tags/core/hash/eql_tags.txt
  11. +0 −5 spec/truffle/tags/core/hash/equal_value_tags.txt
  12. +0 −1 spec/truffle/tags/core/hash/fetch_tags.txt
  13. +0 −4 spec/truffle/tags/core/hash/has_key_tags.txt
  14. +0 −2 spec/truffle/tags/core/hash/has_value_tags.txt
  15. +0 −3 spec/truffle/tags/core/hash/hash_tags.txt
  16. +0 −4 spec/truffle/tags/core/hash/include_tags.txt
  17. +0 −2 spec/truffle/tags/core/hash/initialize_copy_tags.txt
  18. +0 −1 spec/truffle/tags/core/hash/initialize_tags.txt
  19. +0 −5 spec/truffle/tags/core/hash/inspect_tags.txt
  20. +0 −4 spec/truffle/tags/core/hash/key_tags.txt
  21. +0 −1 spec/truffle/tags/core/hash/length_tags.txt
  22. +0 −4 spec/truffle/tags/core/hash/member_tags.txt
  23. +0 −3 spec/truffle/tags/core/hash/reject_tags.txt
  24. +0 −1 spec/truffle/tags/core/hash/replace_tags.txt
  25. +0 −6 spec/truffle/tags/core/hash/select_tags.txt
  26. +0 −1 spec/truffle/tags/core/hash/size_tags.txt
  27. +0 −2 spec/truffle/tags/core/hash/sort_tags.txt
  28. +0 −4 spec/truffle/tags/core/hash/store_tags.txt
  29. +0 −4 spec/truffle/tags/core/hash/to_h_tags.txt
  30. +0 −5 spec/truffle/tags/core/hash/to_s_tags.txt
  31. +0 −8 spec/truffle/tags/core/hash/update_tags.txt
  32. +0 −2 spec/truffle/tags/core/hash/value_tags.txt
  33. +84 −74 truffle/src/main/java/org/jruby/truffle/nodes/core/HashNodes.java
  34. +34 −0 truffle/src/main/java/org/jruby/truffle/translator/BodyTranslator.java
  35. +61 −0 truffle/src/main/ruby/core/rubinius/common/hash.rb
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/hash/clear_tags.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
fails:Hash#clear removes all key, value pairs
fails:Hash#clear does not remove default values
fails:Hash#clear raises a RuntimeError if called on a frozen instance
9 changes: 0 additions & 9 deletions spec/truffle/tags/core/hash/constructor_tags.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
fails:Hash.[] creates a Hash; values can be provided as the argument list
fails:Hash.[] creates a Hash; values can be provided as one single hash
fails:Hash.[] creates a Hash; values can be provided as a list of value-pairs in an array
fails:Hash.[] coerces a single argument which responds to #to_ary
fails:Hash.[] ignores elements that are not arrays
fails:Hash.[] raises an ArgumentError for arrays of more than 2 elements
fails:Hash.[] raises an ArgumentError when passed a list of value-invalid-pairs in an array
fails:Hash.[] raises an ArgumentError when passed an odd number of arguments
fails:Hash.[] calls to_hash
fails:Hash.[] returns an instance of a subclass when passed an Array
fails:Hash.[] returns instances of subclasses
fails:Hash.[] returns an instance of the class it's called on
fails:Hash.[] does not call #initialize on the subclass instance
fails:Hash.[] removes the default_proc
fails:Hash.[] passed an array treats elements that are 2 element arrays as key and value
fails:Hash.[] passed an array treats elements that are 1 element arrays as keys with value nil
fails:Hash.[] passed a single argument which responds to #to_hash coerces it and returns a copy
10 changes: 1 addition & 9 deletions spec/truffle/tags/core/hash/default_proc_tags.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
fails:Hash#default_proc= replaces the block passed to Hash.new
fails:Hash#default_proc= uses :to_proc on its argument
fails:Hash#default_proc= overrides the static default
fails:Hash#default_proc= raises an error if passed stuff not convertible to procs
fails:Hash#default_proc= returns the passed Proc
fails:Hash#default_proc= clears the default proc if passed nil
fails:Hash#default_proc= returns nil if passed nil
fails:Hash#default_proc= raises a TypeError if passed a lambda with an arity other than 2
fails:Hash#default_proc= raises a RuntimeError if self is frozen
fails:Hash#default_proc= accepts a lambda with an arity of 2
4 changes: 0 additions & 4 deletions spec/truffle/tags/core/hash/default_tags.txt

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/core/hash/delete_tags.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
fails:Hash#delete removes the entry and returns the deleted value
fails:Hash#delete calls supplied block if the key is not found
fails:Hash#delete returns nil if the key is not found when no block is given
fails:Hash#delete accepts keys with private #hash method
fails:Hash#delete raises a RuntimeError if called on a frozen instance
7 changes: 0 additions & 7 deletions spec/truffle/tags/core/hash/each_pair_tags.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
fails:Hash#each_pair yields a [[key, value]] Array for each pair to a block expecting |*args|
fails:Hash#each_pair yields the key and value of each pair to a block expecting |key, value|
fails:Hash#each_pair yields the key only to a block expecting |key,|
fails:Hash#each_pair uses the same order as keys() and values()
fails:Hash#each_pair properly expands (or not) child class's 'each'-yielded args
fails:Hash#each_pair returns an Enumerator if called on a non-empty hash without a block
fails:Hash#each_pair returns an Enumerator if called on an empty hash without a block
fails:Hash#each_pair returns an Enumerator if called on a frozen instance
6 changes: 0 additions & 6 deletions spec/truffle/tags/core/hash/element_reference_tags.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
fails:Hash#[] returns the value for key
fails:Hash#[] returns nil as default default value
fails:Hash#[] calls subclass implementations of default
fails:Hash#[] returns the default (dynamic) value for missing keys
fails:Hash#[] compares keys with eql? semantics
fails:Hash#[] does not compare keys with different #hash values via #eql?
fails:Hash#[] compares keys with the same #hash value via #eql?
fails:Hash#[] finds a value via an identical key even when its #eql? isn't reflexive
fails:Hash#[] supports keys with private #hash method
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/hash/element_set_tags.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
fails:Hash#[]= associates the key with the value and return the value
fails:Hash#[]= accepts keys with private #hash method
fails:Hash#[]= duplicates and freezes string keys
fails:Hash#[]= doesn't duplicate and freeze already frozen string keys
fails:Hash#[]= raises a RuntimeError if called on a frozen instance
1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/empty_tags.txt

This file was deleted.

4 changes: 0 additions & 4 deletions spec/truffle/tags/core/hash/eql_tags.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
fails:Hash#eql? does not compare values when keys don't match
fails:Hash#eql? returns false when the numbers of keys differ without comparing any elements
fails:Hash#eql? first compares keys via hash
fails:Hash#eql? does not compare keys with different hash codes via eql?
fails:Hash#eql? computes equality for complex recursive hashes
fails:Hash#eql? computes equality for recursive hashes & arrays
fails:Hash#eql? compares values when keys match
5 changes: 0 additions & 5 deletions spec/truffle/tags/core/hash/equal_value_tags.txt
Original file line number Diff line number Diff line change
@@ -2,16 +2,11 @@ fails:Hash#== does not compare values when keys don't match
fails:Hash#== returns false when the numbers of keys differ without comparing any elements
fails:Hash#== first compares keys via hash
fails:Hash#== does not compare keys with different hash codes via eql?
fails:Hash#== computes equality for recursive hashes
fails:Hash#== doesn't call to_hash on objects
fails:Hash#== computes equality for complex recursive hashes
fails:Hash#== computes equality for recursive hashes & arrays
fails:Hash#== compares values when keys match
fails:Hash#== compares keys with eql? semantics
fails:Hash#== returns true iff other Hash has the same number of keys and each key-value pair matches
fails:Hash#== does not call to_hash on hash subclasses
fails:Hash#== ignores hash class differences
fails:Hash#== compares keys with matching hash codes via eql?
fails:Hash#== compares the values in self to values in other hash
fails:Hash#== returns true if other Hash has the same number of keys and each key-value pair matches, even though the default-value are not same
fails:Hash#== compares values with == semantics
1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/fetch_tags.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
fails:Hash#fetch returns the value for key
fails:Hash#fetch returns default if key is not found when passed a default
4 changes: 0 additions & 4 deletions spec/truffle/tags/core/hash/has_key_tags.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
fails:Hash#has_key? returns true if argument is a key
fails:Hash#has_key? returns true if the key's matching value was nil
fails:Hash#has_key? returns true if the key's matching value was false
fails:Hash#has_key? returns true if the key is nil
fails:Hash#has_key? compares keys with the same #hash value via #eql?
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/hash/has_value_tags.txt

This file was deleted.

3 changes: 0 additions & 3 deletions spec/truffle/tags/core/hash/hash_tags.txt

This file was deleted.

4 changes: 0 additions & 4 deletions spec/truffle/tags/core/hash/include_tags.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
fails:Hash#include? returns true if argument is a key
fails:Hash#include? returns true if the key's matching value was nil
fails:Hash#include? returns true if the key's matching value was false
fails:Hash#include? returns true if the key is nil
fails:Hash#include? compares keys with the same #hash value via #eql?
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/hash/initialize_copy_tags.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
fails:Hash#initialize_copy replaces the contents of self with other
fails:Hash#initialize_copy tries to convert the passed argument to a hash using #to_hash
fails:Hash#initialize_copy calls to_hash on hash subclasses
fails:Hash#initialize_copy does not transfer default values
fails:Hash#initialize_copy raises a RuntimeError if called on a frozen instance that is modified
fails:Hash#initialize_copy raises a RuntimeError if called on a frozen instance that would not be modified
1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/initialize_tags.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
fails:Hash#initialize can be used to reset default_proc
fails:Hash#initialize returns self
fails:Hash#initialize raises a RuntimeError if called on a frozen instance
5 changes: 0 additions & 5 deletions spec/truffle/tags/core/hash/inspect_tags.txt

This file was deleted.

4 changes: 0 additions & 4 deletions spec/truffle/tags/core/hash/key_tags.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
fails:Hash#key? returns true if argument is a key
fails:Hash#key? returns true if the key's matching value was nil
fails:Hash#key? returns true if the key's matching value was false
fails:Hash#key? returns true if the key is nil
fails:Hash#key? compares keys with the same #hash value via #eql?
fails:Hash#key returns the corresponding key for value
fails:Hash#key returns nil if the value is not found
1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/length_tags.txt

This file was deleted.

4 changes: 0 additions & 4 deletions spec/truffle/tags/core/hash/member_tags.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
fails:Hash#member? returns true if argument is a key
fails:Hash#member? returns true if the key's matching value was nil
fails:Hash#member? returns true if the key's matching value was false
fails:Hash#member? returns true if the key is nil
fails:Hash#member? compares keys with the same #hash value via #eql?
3 changes: 0 additions & 3 deletions spec/truffle/tags/core/hash/reject_tags.txt
Original file line number Diff line number Diff line change
@@ -3,9 +3,6 @@ fails:Hash#reject is equivalent to hsh.dup.delete_if
fails:Hash#reject returns subclass instance for subclasses
fails:Hash#reject taints the resulting hash
fails:Hash#reject processes entries with the same order as reject!
fails:Hash#reject returns an Enumerator if called on a non-empty hash without a block
fails:Hash#reject returns an Enumerator if called on an empty hash without a block
fails:Hash#reject returns an Enumerator if called on a frozen instance
fails:Hash#reject! removes keys from self for which the block yields true
fails:Hash#reject! is equivalent to delete_if if changes are made
fails:Hash#reject! returns nil if no changes were made
1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/replace_tags.txt

This file was deleted.

6 changes: 0 additions & 6 deletions spec/truffle/tags/core/hash/select_tags.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
fails:Hash#select yields two arguments: key and value
fails:Hash#select returns a Hash of entries for which block is true
fails:Hash#select processes entries with the same order as reject
fails:Hash#select returns an Enumerator when called on a non-empty hash without a block
fails:Hash#select returns an Enumerator when called on an empty hash without a block
fails:Hash#select returns an Enumerator if called on a non-empty hash without a block
fails:Hash#select returns an Enumerator if called on an empty hash without a block
fails:Hash#select returns an Enumerator if called on a frozen instance
fails:Hash#select! is equivalent to keep_if if changes are made
fails:Hash#select! returns nil if no changes were made
fails:Hash#select! raises a RuntimeError if called on an empty frozen instance
1 change: 0 additions & 1 deletion spec/truffle/tags/core/hash/size_tags.txt

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/core/hash/sort_tags.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
fails:Hash#sort converts self to a nested array of [key, value] arrays and sort with Array#sort
fails:Hash#sort works when some of the keys are themselves arrays
fails:Hash#sort uses block to sort array if passed a block
4 changes: 0 additions & 4 deletions spec/truffle/tags/core/hash/store_tags.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
fails:Hash#store associates the key with the value and return the value
fails:Hash#store duplicates string keys using dup semantics
fails:Hash#store accepts keys with private #hash method
fails:Hash#store duplicates and freezes string keys
fails:Hash#store doesn't duplicate and freeze already frozen string keys
fails:Hash#store raises a RuntimeError if called on a frozen instance
fails:Hash#store does not raise an exception if changing the value of an existing key during iteration
4 changes: 0 additions & 4 deletions spec/truffle/tags/core/hash/to_h_tags.txt

This file was deleted.

5 changes: 0 additions & 5 deletions spec/truffle/tags/core/hash/to_s_tags.txt

This file was deleted.

8 changes: 0 additions & 8 deletions spec/truffle/tags/core/hash/update_tags.txt

This file was deleted.

2 changes: 0 additions & 2 deletions spec/truffle/tags/core/hash/value_tags.txt

This file was deleted.

Loading