elixir-lang/elixir — Issue #143: function clause mismatch with erlzmq2
Author: technoweenie
Created: 2012-03-03 16:22:36+00:00
State: open

I'm posting this because I'd expect identical erlang access on modules to work the same in elixir.

```
iex> {:ok, c} = :erlzmq.context
{:ok,""}
iex> {:ok, s} = :erlzmq.socket(c, :req)
{:ok,{1,""}}
iex> :erlzmq.bind(s, "tcp://127.0.0.1:5555")
** (::FunctionClauseError) no function clause matching: erlzmq:bind({1,""}, "tcp://127.0.0.1:5555")
src/erlzmq.erl:130: erlzmq:bind({1,""}, "tcp://127.0.0.1:5555")
erl_eval.erl:572: erl_eval:do_apply/6
elixir:eval_forms/3
elixir:eval/5
::Elixir::IEx.do_loop/2
```

Here's the same thing in erlang:

```erlang
2> {ok, C} = erlzmq:context().
{ok,<<>>}
3> {ok, S} = erlzmq:socket(C, req).
{ok,{1,<<>>}}
4> ok = erlzmq:bind(S, "tcp://127.0.0.1:5555").
ok
5> S
5> .
{1,<<>>}
```

I got this by cloning and building the [latest erlzmq](https://github.com/zeromq/erlzmq2) with Erlang R15B and ZeroMQ 2.1.11 (both are on homebrew).