File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 4040 - uses : ruby/setup-ruby@v1
4141 with :
4242 ruby-version : ${{matrix.ruby}}
43+ - uses : actions/setup-java@v4
44+ with :
45+ distribution : zulu
46+ java-version : 21
47+ if : >-
48+ startsWith(matrix.ruby, 'jruby')
4349 - run : bundle install --jobs 4 --retry 3
4450 - run : rake test
4551 - run : rake build
Original file line number Diff line number Diff line change @@ -68,8 +68,15 @@ if jruby?
6868 lib_dir = ext . lib_dir += "/#{ ext . platform } /racc"
6969 ext . ext_dir = 'ext/racc'
7070 # source/target jvm
71- ext . source_version = '1.8'
72- ext . target_version = '1.8'
71+ if defined? ( JRUBY_VERSION ) && Gem ::Version . new ( JRUBY_VERSION ) >= Gem ::Version . new ( '10.0.0.0' )
72+ # Use Java 21 for JRuby 10.0.0.0 or higher
73+ ext . source_version = '21'
74+ ext . target_version = '21'
75+ else
76+ # Use Java 8 if its lower than JRuby 10.0.0.0
77+ ext . source_version = '1.8'
78+ ext . target_version = '1.8'
79+ end
7380 jars = [ "#{ jruby_home } /lib/jruby.jar" ] + FileList [ 'lib/*.jar' ]
7481 ext . classpath = jars . map { |x | File . expand_path x } . join ( ':' )
7582 ext . name = 'cparse-jruby'
You can’t perform that action at this time.
0 commit comments