Error when constructing binaries

42 views
Skip to first unread message

Eugene Pirogov

unread,
Aug 8, 2016, 12:46:38 PM8/8/16
to elixir-lang-core
I noticed the following difference between 1.3.2 and 1.4.0-dev (c15ca05) when constructing binaries:
<< "1 + 1 = ", "2" >>
1.4.0-dev – works
1.3.2 – works
And:

<< "1 + 1 = ", "#{2}" >>


1.4.0-dev – doesn't work
1.3.2 – works

The last example can be simplified to this: << "#{1}" >>. Both elixir versions were compiled against erlang 19.0.

In the last example, did something change between 1.3.2 and 1.4.0-dev? Looks like interpolating a string inside a binary no longer works? The code that raised the question for me here is this one: https://github.com/igas/faker/blob/master/lib/faker.ex#L35

José Valim

unread,
Aug 8, 2016, 7:22:46 PM8/8/16
to elixir-l...@googlegroups.com
Good catch. Can you please open up an issue?



José Valim
Skype: jv.ptec
Founder and Director of R&D

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/a3d30704-2194-4594-93c1-a52a47017662%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

José Valim

unread,
Aug 8, 2016, 7:38:20 PM8/8/16
to elixir-l...@googlegroups.com
Actually, no worries, it has been fixed in master. :D



José Valim
Skype: jv.ptec
Founder and Director of R&D

Eugene Pirogov

unread,
Aug 8, 2016, 11:02:43 PM8/8/16
to elixir-l...@googlegroups.com
Awesome! Thanks José! :)

--
You received this message because you are subscribed to a topic in the Google Groups "elixir-lang-core" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elixir-lang-core/oVPo8SuzUJ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4JRWzrZVikpRt%2B7VscFCneik0CxmexkBFRxyeTJBFkfhg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Onorio Catenacci

unread,
Aug 9, 2016, 3:57:07 PM8/9/16
to elixir-lang-core
Kudos for a great bug report.  Nice small, simple, test case.  If only I were always so diligent when I submit potential problems. :)

--
Onorio
Reply all
Reply to author
Forward
0 new messages