On Wednesday, March 16, 2016 at 3:56:56 PM UTC-7, Happy wrote:
>
> Hi,
> i'm having problems when trying apply Fixnum.to_s(radix) on numeric 
> fields. It simply wont work for me, to_s somewhat ignores radix part 
> (strange part on this is exception when trying ie. to_s(37) which 
> indicates, that call to ruby core is executed). BTW Integer.to_s(radix) 
> works as expected.
>
> Is there any workaround for this issue?
>

This seems to be a ruby question, not a Sequel question. However, since you 
mentioned numeric fields, Sequel in general returns numeric/decimal fields 
as BigDecimal instances, and BigDecimal#to_s does not support radixes.  If 
your BigDecimal instance has no fractional part, you could try: 
to_i.to_s(radix)

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to