ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:90867] [Ruby trunk Bug#15500] Behavior of require method in 2.5 is different from 2.4 and 2.6
       [not found] <redmine.issue-15500.20190103053456@ruby-lang.org>
@ 2019-01-03  5:34 ` muraken
  2019-01-03  6:40 ` [ruby-core:90868] " ruby-core
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: muraken @ 2019-01-03  5:34 UTC (permalink / raw)
  To: ruby-core

Issue #15500 has been reported by mrkn (Kenta Murata).

----------------------------------------
Bug #15500: Behavior of require method in 2.5 is different from 2.4 and 2.6
https://bugs.ruby-lang.org/issues/15500

* Author: mrkn (Kenta Murata)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
On Ruby 2.5, `require 'bigdecimal'` does not load `bigdecimal.so` in gem-installed version of bigdecimal without specifying the version by `gem` method.
You can examine this phenomenon by the following code.

```ruby
require 'bigdecimal'
p $LOADED_FEATURES.grep(/bigdecimal/).first
```

After installing bigdecimal-1.4.2 by `gem install bigdecimal` command, this code (saved as `t.rb`) show the following results:

On Ruby 2.4.5

```
$ ruby-2.4.5 -v t.rb
ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3:

```
$ ruby-2.5.3 -v t.rb
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/bigdecimal.bundle"
```

On Ruby 2.6.0:

```
$ ruby-2.6.0 -v t.rb
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3, with `gem 'bigdecimal', '1.4.2'`, the correct file can be loaded.

```
$ { echo "gem 'bigdecimal', '1.4.2'"; cat t.rb } | ruby-2.5.3 -v -
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:90868] [Ruby trunk Bug#15500] Behavior of require method in 2.5 is different from 2.4 and 2.6
       [not found] <redmine.issue-15500.20190103053456@ruby-lang.org>
  2019-01-03  5:34 ` [ruby-core:90867] [Ruby trunk Bug#15500] Behavior of require method in 2.5 is different from 2.4 and 2.6 muraken
@ 2019-01-03  6:40 ` ruby-core
  2019-01-03  7:13 ` [ruby-core:90869] " muraken
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: ruby-core @ 2019-01-03  6:40 UTC (permalink / raw)
  To: ruby-core

Issue #15500 has been updated by marcandre (Marc-Andre Lafortune).


I was expecting the behavior in 2.5. That's what is correct, right?

I tested with `matrix` gem, and 2.4 behaves like 2.5, which is to say it loads the gem only if `gem 'matrix'` is called. Note that 2.4 didn't ship with default `matrix` gem (it was std lib), but it did ship with defaut `bigdecimal` gem.

I also realized that it's not possible to load the 0.1.0 `matrix` gem in 2.6.0 because it shipped with that version of the local gem. That in itself is a problem, as the public gem `matrix` v0.1.0 is actually older than the local gem that has shipped with Ruby 2.6.0. I will release v1.0.0 to avoid this issue, and I will have to be careful when mirroring the gem.

----------------------------------------
Bug #15500: Behavior of require method in 2.5 is different from 2.4 and 2.6
https://bugs.ruby-lang.org/issues/15500#change-76055

* Author: mrkn (Kenta Murata)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
On Ruby 2.5, `require 'bigdecimal'` does not load `bigdecimal.so` in gem-installed version of bigdecimal without specifying the version by `gem` method.
You can examine this phenomenon by the following code.

```ruby
require 'bigdecimal'
p $LOADED_FEATURES.grep(/bigdecimal/).first
```

After installing bigdecimal-1.4.2 by `gem install bigdecimal` command, this code (saved as `t.rb`) show the following results:

On Ruby 2.4.5

```
$ ruby-2.4.5 -v t.rb
ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3:

```
$ ruby-2.5.3 -v t.rb
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/bigdecimal.bundle"
```

On Ruby 2.6.0:

```
$ ruby-2.6.0 -v t.rb
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3, with `gem 'bigdecimal', '1.4.2'`, the correct file can be loaded.

```
$ ( echo "gem 'bigdecimal', '1.4.2'"; cat t.rb ) | ruby-2.5.3 -v -
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:90869] [Ruby trunk Bug#15500] Behavior of require method in 2.5 is different from 2.4 and 2.6
       [not found] <redmine.issue-15500.20190103053456@ruby-lang.org>
  2019-01-03  5:34 ` [ruby-core:90867] [Ruby trunk Bug#15500] Behavior of require method in 2.5 is different from 2.4 and 2.6 muraken
  2019-01-03  6:40 ` [ruby-core:90868] " ruby-core
@ 2019-01-03  7:13 ` muraken
  2019-01-10  8:56 ` [ruby-core:90983] [Ruby trunk Bug#15500][Assigned] " hsbt
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: muraken @ 2019-01-03  7:13 UTC (permalink / raw)
  To: ruby-core

Issue #15500 has been updated by mrkn (Kenta Murata).


I think the behavior of 2.5 can be thought of a bug because the behavior for .so file isn't consistent with one for .rb file.
You can see the inconsistency in the results below.

```
$ ruby -rbigdecimal/util -ve 'p $LOADED_FEATURES.grep(/bigdecimal/)'
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
["/usr/local/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal.so", "/usr/local/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal.rb", "/usr/local/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal/util.so", "/usr/local/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal/util.rb"]
```

In this case, `bigdecimal/util` is required, and the gem-installed version of `bigdecimal/util.rb` is loaded.
You can see the gem-installed version of `bigdecimal.so` is also loaded.

The behavior is changed when `bigdecimal` is required before `bigdecimal/util`.

```
$ ruby -rbigdecimal -rbigdecimal/util -ve 'p $LOADED_FEATURES.grep(/bigdecimal/)'
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
/usr/local/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal.rb:7: warning: method redefined; discarding old new
Traceback (most recent call last):
	5: from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	4: from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	3: from /usr/local/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal/util.rb:9:in `<top (required)>'
	2: from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:34:in `require'
	1: from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
/usr/local/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:130:in `require': /usr/local/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal/util.so: undefined symbol: rmpd_util_str_to_d - /usr/local/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal/util.so (LoadError)
```

In this case, LoadError is occurred by the symbol resolution failure of bigdecimal/util.so.  This file is newly introduced since bigdecimal-1.4.0.
Although `bigdecimal.so` in bigdecimal-1.4.2 has `rmpd_util_str_to_d`, it isn't loaded because the default-gem version of `bigdecimal.so` is loaded by `-rbigdecimal` option.

The difference between the default-gem and gem-installed versions is whether `bigdecimal.rb exists.
Although I've not investigated the implementation of Ruby 2.5's `require` method yet, I consider that Ruby 2.5 won't search in the gem-installed version if there is .so file but there isn't .rb file.

----------------------------------------
Bug #15500: Behavior of require method in 2.5 is different from 2.4 and 2.6
https://bugs.ruby-lang.org/issues/15500#change-76056

* Author: mrkn (Kenta Murata)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
On Ruby 2.5, `require 'bigdecimal'` does not load `bigdecimal.so` in gem-installed version of bigdecimal without specifying the version by `gem` method.
You can examine this phenomenon by the following code.

```ruby
require 'bigdecimal'
p $LOADED_FEATURES.grep(/bigdecimal/).first
```

After installing bigdecimal-1.4.2 by `gem install bigdecimal` command, this code (saved as `t.rb`) show the following results:

On Ruby 2.4.5

```
$ ruby-2.4.5 -v t.rb
ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3:

```
$ ruby-2.5.3 -v t.rb
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/bigdecimal.bundle"
```

On Ruby 2.6.0:

```
$ ruby-2.6.0 -v t.rb
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3, with `gem 'bigdecimal', '1.4.2'`, the correct file can be loaded.

```
$ ( echo "gem 'bigdecimal', '1.4.2'"; cat t.rb ) | ruby-2.5.3 -v -
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:90983] [Ruby trunk Bug#15500][Assigned] Behavior of require method in 2.5 is different from 2.4 and 2.6
       [not found] <redmine.issue-15500.20190103053456@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-01-03  7:13 ` [ruby-core:90869] " muraken
@ 2019-01-10  8:56 ` hsbt
  2019-01-17 12:52 ` [ruby-core:91141] [Ruby trunk Bug#15500] " hsbt
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: hsbt @ 2019-01-10  8:56 UTC (permalink / raw)
  To: ruby-core

Issue #15500 has been updated by hsbt (Hiroshi SHIBATA).

Status changed from Open to Assigned
Assignee set to hsbt (Hiroshi SHIBATA)

----------------------------------------
Bug #15500: Behavior of require method in 2.5 is different from 2.4 and 2.6
https://bugs.ruby-lang.org/issues/15500#change-76200

* Author: mrkn (Kenta Murata)
* Status: Assigned
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
On Ruby 2.5, `require 'bigdecimal'` does not load `bigdecimal.so` in gem-installed version of bigdecimal without specifying the version by `gem` method.
You can examine this phenomenon by the following code.

```ruby
require 'bigdecimal'
p $LOADED_FEATURES.grep(/bigdecimal/).first
```

After installing bigdecimal-1.4.2 by `gem install bigdecimal` command, this code (saved as `t.rb`) show the following results:

On Ruby 2.4.5

```
$ ruby-2.4.5 -v t.rb
ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3:

```
$ ruby-2.5.3 -v t.rb
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/bigdecimal.bundle"
```

On Ruby 2.6.0:

```
$ ruby-2.6.0 -v t.rb
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3, with `gem 'bigdecimal', '1.4.2'`, the correct file can be loaded.

```
$ ( echo "gem 'bigdecimal', '1.4.2'"; cat t.rb ) | ruby-2.5.3 -v -
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:91141] [Ruby trunk Bug#15500] Behavior of require method in 2.5 is different from 2.4 and 2.6
       [not found] <redmine.issue-15500.20190103053456@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2019-01-10  8:56 ` [ruby-core:90983] [Ruby trunk Bug#15500][Assigned] " hsbt
@ 2019-01-17 12:52 ` hsbt
  2019-01-19  3:37 ` [ruby-core:91168] " hsbt
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: hsbt @ 2019-01-17 12:52 UTC (permalink / raw)
  To: ruby-core

Issue #15500 has been updated by hsbt (Hiroshi SHIBATA).


I could reproduce them. But I also reproduce it with Ruby 2.5.3 with RubyGems 2.6.14.3 bundled with Ruby 2.4.

```
~ > ruby -v
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
~ > gem -v
2.6.14.3
~ > gem list bigdecimal

*** LOCAL GEMS ***

bigdecimal (1.4.3, default: 1.3.4)
~ > ruby -e "require 'bigdecimal'; p \$LOADED_FEATURES.grep(/bigdecimal/).first"
"/Users/hsbt/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/bigdecimal.bundle"
```

It seems this issue produced by Ruby core without RubyGems maybe. 

----------------------------------------
Bug #15500: Behavior of require method in 2.5 is different from 2.4 and 2.6
https://bugs.ruby-lang.org/issues/15500#change-76372

* Author: mrkn (Kenta Murata)
* Status: Assigned
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
On Ruby 2.5, `require 'bigdecimal'` does not load `bigdecimal.so` in gem-installed version of bigdecimal without specifying the version by `gem` method.
You can examine this phenomenon by the following code.

```ruby
require 'bigdecimal'
p $LOADED_FEATURES.grep(/bigdecimal/).first
```

After installing bigdecimal-1.4.2 by `gem install bigdecimal` command, this code (saved as `t.rb`) show the following results:

On Ruby 2.4.5

```
$ ruby-2.4.5 -v t.rb
ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3:

```
$ ruby-2.5.3 -v t.rb
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/bigdecimal.bundle"
```

On Ruby 2.6.0:

```
$ ruby-2.6.0 -v t.rb
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3, with `gem 'bigdecimal', '1.4.2'`, the correct file can be loaded.

```
$ ( echo "gem 'bigdecimal', '1.4.2'"; cat t.rb ) | ruby-2.5.3 -v -
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:91168] [Ruby trunk Bug#15500] Behavior of require method in 2.5 is different from 2.4 and 2.6
       [not found] <redmine.issue-15500.20190103053456@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2019-01-17 12:52 ` [ruby-core:91141] [Ruby trunk Bug#15500] " hsbt
@ 2019-01-19  3:37 ` hsbt
  2019-01-24  1:00 ` [ruby-core:91238] " naruse
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: hsbt @ 2019-01-19  3:37 UTC (permalink / raw)
  To: ruby-core

Issue #15500 has been updated by hsbt (Hiroshi SHIBATA).


@mrkn

Can you try with Ruby 2.5 applied r66867?

----------------------------------------
Bug #15500: Behavior of require method in 2.5 is different from 2.4 and 2.6
https://bugs.ruby-lang.org/issues/15500#change-76397

* Author: mrkn (Kenta Murata)
* Status: Closed
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
On Ruby 2.5, `require 'bigdecimal'` does not load `bigdecimal.so` in gem-installed version of bigdecimal without specifying the version by `gem` method.
You can examine this phenomenon by the following code.

```ruby
require 'bigdecimal'
p $LOADED_FEATURES.grep(/bigdecimal/).first
```

After installing bigdecimal-1.4.2 by `gem install bigdecimal` command, this code (saved as `t.rb`) show the following results:

On Ruby 2.4.5

```
$ ruby-2.4.5 -v t.rb
ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3:

```
$ ruby-2.5.3 -v t.rb
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/bigdecimal.bundle"
```

On Ruby 2.6.0:

```
$ ruby-2.6.0 -v t.rb
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3, with `gem 'bigdecimal', '1.4.2'`, the correct file can be loaded.

```
$ ( echo "gem 'bigdecimal', '1.4.2'"; cat t.rb ) | ruby-2.5.3 -v -
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:91238] [Ruby trunk Bug#15500] Behavior of require method in 2.5 is different from 2.4 and 2.6
       [not found] <redmine.issue-15500.20190103053456@ruby-lang.org>
                   ` (5 preceding siblings ...)
  2019-01-19  3:37 ` [ruby-core:91168] " hsbt
@ 2019-01-24  1:00 ` naruse
  2019-01-24  6:06 ` [ruby-core:91245] " muraken
  2019-02-05 12:15 ` [ruby-core:91408] " nagachika00
  8 siblings, 0 replies; 9+ messages in thread
From: naruse @ 2019-01-24  1:00 UTC (permalink / raw)
  To: ruby-core

Issue #15500 has been updated by naruse (Yui NARUSE).

Backport changed from 2.4: DONTNEED, 2.5: REQUIRED, 2.6: REQUIRED to 2.4: DONTNEED, 2.5: REQUIRED, 2.6: DONE

ruby_2_6 r66913 merged revision(s) 66867.

----------------------------------------
Bug #15500: Behavior of require method in 2.5 is different from 2.4 and 2.6
https://bugs.ruby-lang.org/issues/15500#change-76483

* Author: mrkn (Kenta Murata)
* Status: Closed
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
* Backport: 2.4: DONTNEED, 2.5: REQUIRED, 2.6: DONE
----------------------------------------
On Ruby 2.5, `require 'bigdecimal'` does not load `bigdecimal.so` in gem-installed version of bigdecimal without specifying the version by `gem` method.
You can examine this phenomenon by the following code.

```ruby
require 'bigdecimal'
p $LOADED_FEATURES.grep(/bigdecimal/).first
```

After installing bigdecimal-1.4.2 by `gem install bigdecimal` command, this code (saved as `t.rb`) show the following results:

On Ruby 2.4.5

```
$ ruby-2.4.5 -v t.rb
ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3:

```
$ ruby-2.5.3 -v t.rb
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/bigdecimal.bundle"
```

On Ruby 2.6.0:

```
$ ruby-2.6.0 -v t.rb
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3, with `gem 'bigdecimal', '1.4.2'`, the correct file can be loaded.

```
$ ( echo "gem 'bigdecimal', '1.4.2'"; cat t.rb ) | ruby-2.5.3 -v -
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:91245] [Ruby trunk Bug#15500] Behavior of require method in 2.5 is different from 2.4 and 2.6
       [not found] <redmine.issue-15500.20190103053456@ruby-lang.org>
                   ` (6 preceding siblings ...)
  2019-01-24  1:00 ` [ruby-core:91238] " naruse
@ 2019-01-24  6:06 ` muraken
  2019-02-05 12:15 ` [ruby-core:91408] " nagachika00
  8 siblings, 0 replies; 9+ messages in thread
From: muraken @ 2019-01-24  6:06 UTC (permalink / raw)
  To: ruby-core

Issue #15500 has been updated by mrkn (Kenta Murata).


@hsbt
I've confirmed that Ruby 2.5 with r66867 loads bigdecimal installed by gem, correctly.

----------------------------------------
Bug #15500: Behavior of require method in 2.5 is different from 2.4 and 2.6
https://bugs.ruby-lang.org/issues/15500#change-76491

* Author: mrkn (Kenta Murata)
* Status: Closed
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
* Backport: 2.4: DONTNEED, 2.5: REQUIRED, 2.6: DONE
----------------------------------------
On Ruby 2.5, `require 'bigdecimal'` does not load `bigdecimal.so` in gem-installed version of bigdecimal without specifying the version by `gem` method.
You can examine this phenomenon by the following code.

```ruby
require 'bigdecimal'
p $LOADED_FEATURES.grep(/bigdecimal/).first
```

After installing bigdecimal-1.4.2 by `gem install bigdecimal` command, this code (saved as `t.rb`) show the following results:

On Ruby 2.4.5

```
$ ruby-2.4.5 -v t.rb
ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3:

```
$ ruby-2.5.3 -v t.rb
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/bigdecimal.bundle"
```

On Ruby 2.6.0:

```
$ ruby-2.6.0 -v t.rb
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3, with `gem 'bigdecimal', '1.4.2'`, the correct file can be loaded.

```
$ ( echo "gem 'bigdecimal', '1.4.2'"; cat t.rb ) | ruby-2.5.3 -v -
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ruby-core:91408] [Ruby trunk Bug#15500] Behavior of require method in 2.5 is different from 2.4 and 2.6
       [not found] <redmine.issue-15500.20190103053456@ruby-lang.org>
                   ` (7 preceding siblings ...)
  2019-01-24  6:06 ` [ruby-core:91245] " muraken
@ 2019-02-05 12:15 ` nagachika00
  8 siblings, 0 replies; 9+ messages in thread
From: nagachika00 @ 2019-02-05 12:15 UTC (permalink / raw)
  To: ruby-core

Issue #15500 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.4: DONTNEED, 2.5: REQUIRED, 2.6: DONE to 2.4: DONTNEED, 2.5: DONE, 2.6: DONE

ruby_2_5 r67013 merged revision(s) 66867.

----------------------------------------
Bug #15500: Behavior of require method in 2.5 is different from 2.4 and 2.6
https://bugs.ruby-lang.org/issues/15500#change-76667

* Author: mrkn (Kenta Murata)
* Status: Closed
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
* Backport: 2.4: DONTNEED, 2.5: DONE, 2.6: DONE
----------------------------------------
On Ruby 2.5, `require 'bigdecimal'` does not load `bigdecimal.so` in gem-installed version of bigdecimal without specifying the version by `gem` method.
You can examine this phenomenon by the following code.

```ruby
require 'bigdecimal'
p $LOADED_FEATURES.grep(/bigdecimal/).first
```

After installing bigdecimal-1.4.2 by `gem install bigdecimal` command, this code (saved as `t.rb`) show the following results:

On Ruby 2.4.5

```
$ ruby-2.4.5 -v t.rb
ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3:

```
$ ruby-2.5.3 -v t.rb
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/bigdecimal.bundle"
```

On Ruby 2.6.0:

```
$ ruby-2.6.0 -v t.rb
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```

On Ruby 2.5.3, with `gem 'bigdecimal', '1.4.2'`, the correct file can be loaded.

```
$ ( echo "gem 'bigdecimal', '1.4.2'"; cat t.rb ) | ruby-2.5.3 -v -
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]
"/Users/mrkn/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bigdecimal-1.4.2/lib/bigdecimal.bundle"
```



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-02-05 12:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-15500.20190103053456@ruby-lang.org>
2019-01-03  5:34 ` [ruby-core:90867] [Ruby trunk Bug#15500] Behavior of require method in 2.5 is different from 2.4 and 2.6 muraken
2019-01-03  6:40 ` [ruby-core:90868] " ruby-core
2019-01-03  7:13 ` [ruby-core:90869] " muraken
2019-01-10  8:56 ` [ruby-core:90983] [Ruby trunk Bug#15500][Assigned] " hsbt
2019-01-17 12:52 ` [ruby-core:91141] [Ruby trunk Bug#15500] " hsbt
2019-01-19  3:37 ` [ruby-core:91168] " hsbt
2019-01-24  1:00 ` [ruby-core:91238] " naruse
2019-01-24  6:06 ` [ruby-core:91245] " muraken
2019-02-05 12:15 ` [ruby-core:91408] " nagachika00

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).