[#82706] [Ruby trunk Bug#13851] getting "can't modify string; temporarily locked" on non-frozen instances — cardoso_tiago@...
Issue #13851 has been updated by chucke (Tiago Cardoso).
3 messages
2017/09/07
[#82853] [Ruby trunk Bug#13916] Race condition when sending a signal to a new fork — russell.davis@...
Issue #13916 has been reported by russelldavis (Russell Davis).
3 messages
2017/09/19
[#82892] [Ruby trunk Bug#13921] buffered read_nonblock doesn't work as expected using SSLSocket — cardoso_tiago@...
Issue #13921 has been updated by chucke (Tiago Cardoso).
3 messages
2017/09/20
[ruby-core:82942] [Ruby trunk Bug#13932] [PATCH] Extension libraries take precedence in checks of later Kernel.#require calls for features without file extensions
From:
akihiko.odaki.4i@...
Date:
2017-09-23 16:48:32 UTC
List:
ruby-core #82942
Issue #13932 has been reported by akihikodaki (Akihiko Odaki). ---------------------------------------- Bug #13932: [PATCH] Extension libraries take precedence in checks of later Kernel.#require calls for features without file extensions https://bugs.ruby-lang.org/issues/13932 * Author: akihikodaki (Akihiko Odaki) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.5.0dev (2017-09-23 trunk 60002) [x86_64-linux] * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- Extension libraries take precedence in checks of later `Kernel.#require` calls for features without file extensions. That behavior is inconsistent with the first call, and can cause problems. For instance, feature `openssl` has `openssl.rb` and `openssl.so`, but it assumes `openssl.rb` will always be loaded when it gets required. That assumption works for the first call of `Kernel.#require`, but for the later calls, `require` assumes `openssl.so` is being required and checks if the file is valid for the requirement. Usually that is not so problematic since it just check if `openssl.so`, which is already required by `openssl.rb`, is required or not. However, if there is a new alternative `openssl.rb` in `$:`, the file will be loaded and conflict with the feature already loaded. The below is a code example. ~~~Ruby p $:.include? '/usr/lib/ruby/2.4.0' # true p $:.include? '/home/aki/mastodon/vendor/bundle/ruby/2.4.0/gems/openssl-2.0.5/lib' # false p $".include? '/usr/lib/ruby/2.4.0/openssl/openssl.rb' # false p $".include? '/home/aki/mastodon/vendor/bundle/ruby/2.4.0/gems/openssl-2.0.5/lib/openssl.rb' # false require 'openssl' p $".include? '/usr/lib/ruby/2.4.0/openssl/openssl.rb' # true p $".include? '/home/aki/mastodon/vendor/bundle/ruby/2.4.0/gems/openssl-2.0.5/lib/openssl.rb' # false $:.unshift '/home/aki/mastodon/vendor/bundle/ruby/2.4.0/gems/openssl-2.0.5/lib' require 'openssl' p $".include? '/home/aki/mastodon/vendor/bundle/ruby/2.4.0/gems/openssl-2.0.5/lib/openssl.rb' # true (unexpected) ~~~ ---Files-------------------------------- load.patch (2.42 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>