1
0
Fork 0
mirror of https://github.com/rails/execjs synced 2023-03-27 23:21:20 -04:00

Merge pull request #69 from ai/patch-1

Fix for empty EXECJS_RUNTIME
This commit is contained in:
Richard Schneeman 2017-09-28 12:41:22 -05:00 committed by GitHub
commit 5f78865d36

View file

@ -64,7 +64,9 @@ module ExecJS
end
def self.from_environment
if name = ENV["EXECJS_RUNTIME"]
env = ENV["EXECJS_RUNTIME"]
if env && !env.empty?
name = env
raise RuntimeUnavailable, "#{name} runtime is not defined" unless const_defined?(name)
runtime = const_get(name)