diff --git a/lib/atom.ex b/lib/atom.ex index e5af73ceaf..b1b89b3f34 100644 --- a/lib/atom.ex +++ b/lib/atom.ex @@ -8,7 +8,7 @@ object Atom % % TODO Use bit syntax here def inspect - String.new "#{"'"}#{Erlang.erlang.atom_to_binary(self, 'utf8)}" + String.new "#{"'"}#{Erlang.atom_to_binary(self, 'utf8)}" end % Convert an atom to a string. @@ -19,6 +19,6 @@ object Atom % 'A.to_s % => "A" % def to_s - String.new Erlang.erlang.atom_to_binary(self, 'utf8) + String.new Erlang.atom_to_binary(self, 'utf8) end end \ No newline at end of file diff --git a/lib/list.ex b/lib/list.ex index 8251b5cbf1..153c427f7a 100644 --- a/lib/list.ex +++ b/lib/list.ex @@ -24,13 +24,11 @@ object List Erlang.list_to_binary(self) end - % Simply returns self. This method does not ensure the current - % list is really a char list. def to_char_list self end def length - Erlang.erlang.length(self) + Erlang.length(self) end end \ No newline at end of file diff --git a/lib/string.ex b/lib/string.ex index f65483a98f..213302346e 100644 --- a/lib/string.ex +++ b/lib/string.ex @@ -40,7 +40,7 @@ object String % "josé".length % => 4 % def length - Erlang.erlang.length(Erlang.unicode.characters_to_list(@bin, 'utf8)) + Erlang.length(Erlang.unicode.characters_to_list(@bin, 'utf8)) end % Returns the list representation of this String. diff --git a/src/elixir.erl b/src/elixir.erl index 4d7bad8c35..2723f548c3 100644 --- a/src/elixir.erl +++ b/src/elixir.erl @@ -33,13 +33,6 @@ load_file(Filepath, Bindings) -> {ok, String} = file:read_file(Filepath), eval(binary_to_list(String), Bindings, Filepath). -% Read each line as UTF8. -read_line(Device, Accum) -> - case io:get_line(Device, []) of - eof -> file:close(Device), lists:flatten(lists:reverse(Accum)); - Line -> read_line(Device, [Line|Accum]) - end. - % Evaluates a string eval(String) -> eval(String, []). eval(String, Binding) -> eval(String, Binding, "nofile").