Bug #18147
closedURI is not loaded anymore since ruby-2.7.0
Description
It's not a big thing but may break things: Starting with ruby-2.7.0 the URI module is not auto-loaded. Please check/reproduce this using ruby -e "URI"
since ruby-2.7.0
it throws an uninitialized constant URI (NameError)
whereas in previous ruby releases it simply passes.
I have no clue which things have changed from 2.6.6 to 2.7.0 that are causing this unusual behaiviour...
Updated by byroot (Jean Boussier) over 3 years ago
It's a change in rubygems: https://github.com/rubygems/rubygems/commit/0f55f337b174f9f70a213c078ae2a1c2bfd07e75
And is probably for the best.
Updated by sascha (Sascha Willuweit) over 3 years ago
Wow, that was fast. Thanks! The problem is, that it changes the behavior between plain ruby
and any wrapper like irb
. But nevertheless, it's certainly not a ruby but a rubygems issue. So this bug report can be closed.
Updated by hsbt (Hiroshi SHIBATA) over 3 years ago
- Status changed from Open to Closed
It's expected behavior and changes.
You should require "uri"
or -ruri
for using URI
library.
Updated by deivid (David RodrÃguez) over 3 years ago
Wow, that was fast. Thanks! The problem is, that it changes the behavior between plain ruby and any wrapper like irb. But nevertheless, it's certainly not a ruby but a rubygems issue. So this bug report can be closed.
I created a pull request to rubygems so that irb
doesn't change default ruby
behaviour regarding uri
being loaded: https://github.com/rubygems/rubygems/pull/4897.