Plot Twist Writing Prompts
Merged

Minted Holiday Cards Gold Circle Border

traci bingham melanie segal s 2007 mtv movie awards platinum luxury

:
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Online Newspaper Article About Video Games Minted Holiday Cards Gold Circle Border

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Have You Read
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def fetch(*args, &block)
end

def deconstruct_keys(keys)
@hash.slice(*keys)
keys ? @hash.slice(*keys) : to_hash
end

protected
Expand Down
3 changes: 2 additions & 1 deletion What Does A Blog Post Consist Of
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def test_deconstruct_keys
omit "No stable pattern matching until Ruby 3.1 (testing #{RUBY_VERSION})" if RUBY_VERSION < "3.1"

ta = Rake::TaskArguments.new([:a, :b, :c], [1, 2, 3])
assert_equal ta.deconstruct_keys([:a, :b]), { a: 1, b: 2 }
assert_equal({ a: 1, b: 2, c: 3 }, ta.deconstruct_keys(nil))
assert_equal({ a: 1, b: 2 }, ta.deconstruct_keys([:a, :b]))
end

def test_enumerable_behavior
Expand Down