Skip to content

Commit

Permalink
+ Ruby 3.3 support (#904)
Browse files Browse the repository at this point in the history
  • Loading branch information
olefriis authored Jan 5, 2023
1 parent 667d60c commit 160dc2e
Show file tree
Hide file tree
Showing 8 changed files with 3,259 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ lib/parser/ruby28.rb
lib/parser/ruby30.rb
lib/parser/ruby31.rb
lib/parser/ruby32.rb
lib/parser/ruby33.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 @@ -36,6 +36,7 @@ GENERATED_FILES = %w(lib/parser/lexer-F0.rb
lib/parser/ruby30.rb
lib/parser/ruby31.rb
lib/parser/ruby32.rb
lib/parser/ruby33.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 @@ -13,3 +13,4 @@
require 'parser/ruby30'
require 'parser/ruby31'
require 'parser/ruby32'
require 'parser/ruby33'
9 changes: 9 additions & 0 deletions lib/parser/current.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ def warn_syntax_deviation(feature, version)
require 'parser/ruby32'
CurrentRuby = Ruby32

when /^3\.3\./
current_version = '3.3.0-dev'
if RUBY_VERSION != current_version
warn_syntax_deviation 'parser/ruby33', current_version
end

require 'parser/ruby33'
CurrentRuby = Ruby33

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

0 comments on commit 160dc2e

Please sign in to comment.