Project

General

Profile

Actions

Bug #16926

closed

Kernel#require does not load a feature twice when $LOAD_PATH has been modified spec fails only on 2.7

Added by Eregon (Benoit Daloze) almost 4 years ago. Updated about 3 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
[ruby-core:98599]

Description

This spec:
https://github.com/ruby/spec/blob/03f9a0e2f9c23a12614ffb603f32cd971d79616e/core/kernel/shared/require.rb#L246-L251

fails in 2.7.1, but not on Ruby <= 2.6 and not on master.

Could someone investigate why that is and if the change is on purpose or a bug?
It sounds like a bug, because changing the last be_false to be_true then passes for Kernel#require but fails for Kernel.require.

Reproduce with:

$ Use ruby 2.7.1
$ cd ruby/spec
# remove ruby_bug guard in core/kernel/require_spec.rb
$ mspec core/kernel/require_spec.rb
Actions #1

Updated by Eregon (Benoit Daloze) almost 4 years ago

  • Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED

Updated by jeremyevans0 (Jeremy Evans) almost 4 years ago

I bisected this, twice.

Updated by nagachika (Tomoyuki Chikanaga) almost 4 years ago

Thank you for the bisecting.
I think it's hard to backport whole 96064e6f1ce100a37680dc8f9509f06b3350e9c8. Reverting dd16f8524c44f8802e634af2577fe5a149cd740e may fix this issue. I wonder dd16f8524c44f8802e634af2577fe5a149cd740e was the fix for another issues or not.
hsbt san, do you have any idea?

Updated by vo.x (Vit Ondruch) almost 4 years ago

Just FTR, this seems to be related to #16904 and 1 in upstream, resolved by 2.

Updated by deivid (David Rodríguez) almost 4 years ago

Yes, I think ideally we should release rubygems 3.1.5 with the fix, and backport that to ruby 2.7.2. What do you think, hsbt san?

Updated by hsbt (Hiroshi SHIBATA) almost 4 years ago

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

Updated by hsbt (Hiroshi SHIBATA) about 3 years ago

  • Status changed from Assigned to Closed
  • Backport changed from 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONE

Updated by Eregon (Benoit Daloze) about 3 years ago

@hsbt (Hiroshi SHIBATA) That commit seems unrelated.

Updated by hsbt (Hiroshi SHIBATA) about 3 years ago

  • Status changed from Closed to Assigned

Right, I missed to pick https://github.com/rubygems/rubygems/pull/3639 at RubyGems 3.1.5.

Updated by nagachika (Tomoyuki Chikanaga) about 3 years ago

  • Backport changed from 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONE to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED

Thank you for your investigations!
I will take a look at it.

BTW, can I push merge button on GitHub PR into stable branches?

Updated by nagachika (Tomoyuki Chikanaga) about 3 years ago

  • Backport changed from 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONE
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0