@@ -6,25 +6,36 @@ def self.has_support_for(ruby)
66 RUBY_INTERPRETERS [ ruby ] = yield
77 end
88
9- has_support_for 'ruby2.4 ' do
9+ has_support_for 'ruby2.5 ' do
1010 {
1111 version : '2.5' ,
1212 binary : '/usr/bin/ruby2.5' ,
1313 api_version : '2.5.0' ,
1414 shared_library : 'libruby2.5' ,
15- min_ruby_dependency : 'ruby (>= 1:2.5~0)' ,
15+ min_ruby_version : '1:2.5~0' ,
16+ ruby_upper_bound : '1:2.6~' ,
1617 }
1718 end
1819
1920 def self . min_ruby_dependency_for ( shared_library )
2021 RUBY_INTERPRETERS . each do |int , data |
2122 if data [ :shared_library ] == shared_library
22- return data [ :min_ruby_dependency ]
23+ return "ruby (>= %s)" % data [ :min_ruby_version ]
2324 end
2425 end
2526 return nil
2627 end
2728
29+ def self . ruby_upper_bound
30+ sort = IO . popen ( 'sort -V' , 'w+' )
31+ RUBY_INTERPRETERS . values . map do |data |
32+ sort . puts ( data [ :ruby_upper_bound ] )
33+ end
34+ sort . close_write ( )
35+ version = sort . read . split . last
36+ "ruby (<< #{ version } )"
37+ end
38+
2839 #################################################################
2940 # These constants below are kept here for backwards compatibility
3041 #################################################################
0 commit comments