Skip to content

Commit 4cd500f

Browse files
committed
Work around autoloading bugs
1 parent a90ffba commit 4cd500f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Bug fixes:
1111
* Combining multiple `**` arguments containing duplicate keys produced
1212
an incorrect hash. This has now been fixed (#1469).
1313
* `IO#read_nonblock` now returns the passed buffer object, if one is supplied.
14+
* Worked out autoloading issue (#1614).
1415

1516
New features:
1617

lib/mri/net/http.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@
2222

2323
require_relative 'protocol'
2424
require 'uri'
25-
autoload :OpenSSL, 'openssl'
25+
26+
if RUBY_ENGINE == 'truffleruby'
27+
# See tagged specs around autoload
28+
require 'openssl'
29+
else
30+
autoload :OpenSSL, 'openssl'
31+
end
2632

2733
module Net #:nodoc:
2834

0 commit comments

Comments
 (0)