ruby / uri

URI is a module providing classes to handle Uniform Resource Identifiers
https://ruby.github.io/uri/
Other
79 stars 42 forks source link

UnboundMethod#bind_call is 2.7+ only #19

Closed headius closed 3 years ago

headius commented 3 years ago

The uri gem does not specify a minimum Ruby version, but it implicitly requires 2.7+ due to the use of UnboundMethod::bind_call.

JRuby 9.2 available today supports 2.5. JRuby 9.3 due out soon will support 2.6. We will not have a 2.7+ release until JRuby 9.4 later this year.

Is it necessary to use bind_call here? I believe this is the only thing that would prevent the gem from being usable on JRuby 9.2.

headius commented 3 years ago

There are only two places using bind_call, both inspect methods in the RFC parsers.

headius commented 3 years ago

https://github.com/ruby/uri/search?q=bind_call

jeremyevans commented 3 years ago

I'm fine making bind_call optional and setting required_ruby_version to whatever the earliest version is that passes the specs (after adding specs for inspect). I'll submit a PR for that.