Skip to content

Commit

Permalink
Merge pull request #143 from noesya/master
Browse files Browse the repository at this point in the history
Prevent runtime autodetection on gem require
  • Loading branch information
byroot authored Oct 15, 2024
2 parents ea4731d + 7594b6b commit 86cb852
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/execjs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
require "execjs/runtimes"

module ExecJS
self.runtime ||= Runtimes.autodetect
def self.runtime
@runtime ||= Runtimes.autodetect
end
end
1 change: 1 addition & 0 deletions test/test_execjs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

begin
require "execjs"
ExecJS.runtime
rescue ExecJS::RuntimeUnavailable => e
warn e
exit 2
Expand Down

0 comments on commit 86cb852

Please sign in to comment.