Skip to content

Commit

Permalink
Fix hash emitter on kwrestargs
Browse files Browse the repository at this point in the history
  • Loading branch information
mbj committed Oct 8, 2023
1 parent c996bba commit edafcff
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v0.6.8 2023-10-08

[#348](https://github.com/mbj/unparser/pull/348)

* Fix crash on kwrestarg hash member

# v0.6.8 2023-06-14

[#347](https://github.com/mbj/unparser/pull/347)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
unparser (0.6.8)
unparser (0.6.9)
diff-lcs (~> 1.3)
parser (>= 3.2.0)

Expand Down
1 change: 1 addition & 0 deletions config/mutant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ matcher:
- 'Unparser::Emitter::Class#local_variable_scope'
- 'Unparser::Emitter::Def#local_variable_scope'
- 'Unparser::Emitter::FindPattern#dispatch' # 3.0+ specific
- 'Unparser::Emitter::Hash#emit_heredoc_reminder_member' # 3.2+ specific
- 'Unparser::Emitter::HashPattern#write_symbol_body'
- 'Unparser::Emitter::LocalVariableRoot*'
- 'Unparser::Emitter::LocalVariableRoot.included'
Expand Down
2 changes: 1 addition & 1 deletion lib/unparser/emitter/hash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def dispatch
end

def emit_heredoc_reminder_member(node)
emitter(node.children.last).emit_heredoc_reminders
emitter(node.children.last).emit_heredoc_reminders if n_pair?(node)
end

def emit_hash_body
Expand Down
4 changes: 4 additions & 0 deletions test/corpus/literal/since/32.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ def foo(argument, **)
def foo(argument, *)
bar(argument, *)
end

def foo(**)
{ default: 1, ** }
end
2 changes: 1 addition & 1 deletion unparser.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |gem|
gem.name = 'unparser'
gem.version = '0.6.8'
gem.version = '0.6.9'

gem.authors = ['Markus Schirp']
gem.email = 'mbj@schirp-dso.com'
Expand Down

0 comments on commit edafcff

Please sign in to comment.