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

Fix for empty EXECJS_RUNTIME

This commit is contained in:
Andrey Sitnik 2017-09-25 17:00:40 +03:00 committed by GitHub
parent 406b91741b
commit 562c941e1e

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)