Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/assert_json/assert_json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def item(index)
decoded_json_in_scope = @decoded_json
@decoded_json = @decoded_json[index]
begin
yield if block_given?
yield @decoded_json if block_given?
test_for_unexpected_keys(index)
ensure
@decoded_json = decoded_json_in_scope
Expand Down Expand Up @@ -116,7 +116,7 @@ def element(*args)
else
token
end
yield
yield @decoded_json
test_for_unexpected_keys(arg)
ensure
@expected_keys = expected_keys_in_scope
Expand Down