diff options
author | Jeremy Evans <[email protected]> | 2019-10-27 16:03:07 -0700 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2020-06-11 14:02:00 -0700 |
commit | a6cf2f3d22a78aeae9d7f36cc78a195deb686705 (patch) | |
tree | 30a4c537185f3d6fd0fb435f6d981569d30b5e84 /lib/set.rb | |
parent | e100fcbdd1e81c23e3b4c87964aff210232903a8 (diff) |
Make mutating the result of SortedSet#to_a not affect the set
Fixes [Bug #15834]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3215
Diffstat (limited to 'lib/set.rb')
-rw-r--r-- | lib/set.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/set.rb b/lib/set.rb index b8ab6ab172..d405d81178 100644 --- a/lib/set.rb +++ b/lib/set.rb @@ -778,7 +778,7 @@ class SortedSet < Set def to_a (@keys = @hash.keys).sort! unless @keys - @keys + @keys.dup end def freeze |