mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@ac878ad
This commit is contained in:
parent
f0bfa266d7
commit
f02d2f82bf
17 changed files with 214 additions and 3 deletions
|
@ -149,6 +149,12 @@ describe "Hash literal" do
|
|||
-> { {**obj} }.should raise_error(TypeError)
|
||||
end
|
||||
|
||||
it "raises a TypeError if the object does not respond to #to_hash" do
|
||||
obj = 42
|
||||
-> { {**obj} }.should raise_error(TypeError)
|
||||
-> { {a: 1, **obj} }.should raise_error(TypeError)
|
||||
end
|
||||
|
||||
it "does not change encoding of literal string keys during creation" do
|
||||
binary_hash = HashStringsBinary.literal_hash
|
||||
utf8_hash = HashStringsUTF8.literal_hash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue