Skip to content

Commit bb8d70c

Browse files
committed
returning false when Kernel is used in is_module_loaded?
1 parent 1c7e7ec commit bb8d70c

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

lib/elixir_script.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ defmodule ElixirScript do
179179
default_options = Map.new
180180
|> Map.put(:include_path, false)
181181
|> Map.put(:root, nil)
182-
|> Map.put(:env, custom_env)
182+
|> Map.put(:env, custom_env())
183183
|> Map.put(:import_standard_libs, true)
184184
|> Map.put(:core_path, "Elixir")
185185
|> Map.put(:full_build, false)

lib/elixir_script/translator/state.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,11 @@ defmodule ElixirScript.Translator.State do
8787
end
8888
end
8989

90+
def is_module_loaded?(Kernel) do
91+
false
92+
end
93+
9094
def is_module_loaded?(module) when is_atom(module) do
91-
module = get_module_name(module)
9295
Agent.get(__MODULE__, fn(state) ->
9396
Code.ensure_loaded?(module) or (module in state.loaded_modules)
9497
end)

0 commit comments

Comments
 (0)