Skip to content

Commit

Permalink
- Fix up compare tasks for ruby 3.2 differences.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//src/ruby_parser/dev/": change = 13704]
  • Loading branch information
zenspider committed Mar 4, 2023
1 parent 5464620 commit 0b2869e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ def ruby_parse version
file c_parse_y => c_tarball do
in_compare do
extract_glob = case
# defs/id.def
when version > "3.2" then
"{id.h,parse.y,tool/{id2token.rb,lib/vpath.rb},defs/id.def}"
when version > "2.7" then
"{id.h,parse.y,tool/{id2token.rb,lib/vpath.rb}}"
else
Expand All @@ -195,7 +198,8 @@ def ruby_parse version

Dir.chdir ruby_dir do
if File.exist? "tool/id2token.rb" then
sh "ruby tool/id2token.rb --path-separator=.:./ id.h parse.y | expand > ../#{parse_y}"
args = version < "3.2" ? "--path-separator=.:./ id.h" : ""
sh "ruby tool/id2token.rb #{args} parse.y | expand > ../#{parse_y}"
else
sh "expand parse.y > ../#{parse_y}"
end
Expand Down

0 comments on commit 0b2869e

Please sign in to comment.