Skip to content

Commit

Permalink
+ ruby31.y: branch parser.
Browse files Browse the repository at this point in the history
ruby31.y is based on ruby30.y as Ruby 3.0.1. And Ruby 3.0.0 and 3.0.1 are the same (#791) .
  • Loading branch information
koic committed Apr 6, 2021
1 parent de619a2 commit fcc159e
Show file tree
Hide file tree
Showing 9 changed files with 3,099 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ lib/parser/ruby26.rb
lib/parser/ruby27.rb
lib/parser/ruby28.rb
lib/parser/ruby30.rb
lib/parser/ruby31.rb
lib/parser/macruby.rb
lib/parser/rubymotion.rb
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ GENERATED_FILES = %w(lib/parser/lexer.rb
lib/parser/ruby26.rb
lib/parser/ruby27.rb
lib/parser/ruby30.rb
lib/parser/ruby31.rb
lib/parser/macruby.rb
lib/parser/rubymotion.rb)

Expand Down
1 change: 1 addition & 0 deletions lib/parser/all.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
require 'parser/ruby26'
require 'parser/ruby27'
require 'parser/ruby30'
require 'parser/ruby31'
9 changes: 9 additions & 0 deletions lib/parser/current.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ def warn_syntax_deviation(feature, version)
require 'parser/ruby30'
CurrentRuby = Ruby30

when /^3\.1\./
current_version = '3.1.0'
if RUBY_VERSION != current_version
warn_syntax_deviation 'parser/ruby31', current_version
end

require 'parser/ruby31'
CurrentRuby = Ruby31

else # :nocov:
# Keep this in sync with released Ruby.
warn_syntax_deviation 'parser/ruby30', '3.0.x'
Expand Down
Loading

0 comments on commit fcc159e

Please sign in to comment.