Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kwrestarg hash #348

Merged
merged 2 commits into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
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
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
2 changes: 1 addition & 1 deletion scripts/devloop.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
while inotifywait ../mutant/**/*.rb **/*.rb Gemfile unparser.gemspec; do
while inotifywait lib/**/*.rb test/**/*.rb spec/**/*.rb Gemfile unparser.gemspec; do
bundle exec rspec spec/unit -fd --fail-fast --order default \
&& bundle exec ./bin/parser-round-trip-test \
&& bundle exec mutant run --zombie --since HEAD~1 --fail-fast -- 'Unparser*' \
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