Skip to content

Commit cdc8a90

Browse files
nirvdrumeregon
authored andcommitted
Add support for Ruby 3.1's Hash punning.
1 parent c37d6ae commit cdc8a90

File tree

6 files changed

+1679
-1633
lines changed

6 files changed

+1679
-1633
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ New features:
44

55
* Foreign strings now have all methods of Ruby `String`. They are treated as `#frozen?` UTF-8 Ruby Strings.
66
* Add `Java.add_to_classpath` method to add jar paths at runtime (#2693, @bjfish).
7+
* Add support for Ruby 3.1's Hash shorthand/punning syntax (@nirvdrum).
78

89
Bug fixes:
910

spec/tags/language/hash_tags.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
fails:The ** operator makes a caller-side copy when calling a method taking a positional Hash
22
fails:Hash literal checks duplicated keys on initialization
3+
fails:Hash literal checks duplicated float keys on initialization

spec/truffleruby.mspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ class MSpecScript
103103

104104
# Use spec/ruby/core/nil/nil_spec.rb as a dummy file to avoid being empty
105105
set :next, %w[
106+
spec/ruby/language/hash_spec.rb
106107
spec/ruby/core/nil/nil_spec.rb
107108
spec/ruby/core/gc/measure_total_time_spec.rb
108109
spec/ruby/core/gc/total_time_spec.rb

0 commit comments

Comments
 (0)