#17 ✓resolved
Philipp Pirozhkov

to_string() broken

Reported by Philipp Pirozhkov | 2008-12-29 14:47:55 UTC

in ire (and not only ire, but ire too):


>> a=1.2
exception error: bad argument
  in function  list_to_binary/1
     called as list_to_binary([{list,{[],"1.200000"}}])
  in call from reia_list:funcall/3

Comments and changes to this ticket

  • Philipp Pirozhkov

    Philipp Pirozhkov 2008-12-29 15:42:51 UTC

    seems that lazy flattening doesn't work properly

    
    >> (1/4).to_list()            
    => [[48,46,50,53,48,48,48,48]]
    >> (1/4).to_list().to_string()
    exception error: bad argument
      in function  list_to_binary/1
         called as list_to_binary([{list,{[],"0.250000"}}])
      in call from reia_list:funcall/3
      in call from erl_eval:do_apply/5
      in call from eval_shim:exprs/3
      in call from reia_erl:erl_funcall/3
      in call from 'Eval':exprs/2
    
  • Tony Arcieri

    Tony Arcieri 2008-12-29 16:03:21 UTC

    • State changed from “new” to “resolved”

    This is a regression in Numeric#to_string() for floats, from commit 5ee824b1eabfacec6667091583043349d88f3d68 by Jared Kuolt.

    I've corrected the problem and added additional tests to prevent future regressions.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Reia a dynamic scripting language for the Erlang virtual machine (BEAM)

People watching this ticket

Pages