You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been picking at this issue on and off for weeks, but hadn't been able to make any progress on it until now. I have a bunch of RSpec specs that fail only when I'm using Spork, all with the same error message for the same line of code:
Flt::DecNum can't be coerced into BigDecimal
I followed the instructions in your README just now and added a file to ./config/initializers/flt.rb with these conversion functions in it:
DecNum.context.define_conversion_from(BigDecimal) do |x, context|
DecNum(x.to_s)
end
DecNum.context.define_conversion_to(BigDecimal) do |x|
BigDecimal.new(x.to_s)
end
I still get the error though. The mysterious thing to me is that even before I wrote that initializer, the specs all pass without Spork. It's not like I need to use Spork (obviously I've been okay without it for several weeks), but it is pretty annoying having such an arbitrary bug. Can you lend any insight into what's happening here, why it works outside of Spork, and what I can do to fix it?
The text was updated successfully, but these errors were encountered:
I have been picking at this issue on and off for weeks, but hadn't been able to make any progress on it until now. I have a bunch of RSpec specs that fail only when I'm using Spork, all with the same error message for the same line of code:
I followed the instructions in your README just now and added a file to
./config/initializers/flt.rb
with these conversion functions in it:I still get the error though. The mysterious thing to me is that even before I wrote that initializer, the specs all pass without Spork. It's not like I need to use Spork (obviously I've been okay without it for several weeks), but it is pretty annoying having such an arbitrary bug. Can you lend any insight into what's happening here, why it works outside of Spork, and what I can do to fix it?
The text was updated successfully, but these errors were encountered: