Fixnum no tiene un método "inducido_from" en Heroku

What to use as an alternative?

Mi código..

time = Fixnum.induced_from(minutes_past)

This works on my local but not on my remote Heroku.

Heroku doesn't have this method as a listed method for Fixnums.

preguntado el 08 de noviembre de 11 a las 19:11

1 Respuestas

As far as I know this method is deprecated in ruby 1.9.x and last existing version where you can you it is 1.8.7. I believe that is a source of your problem. There are a couple of methods for converting value as instance of Numeric class to value as instance of Fixnum class in 1.9. For example:

1.0.to_i      # => 1
1.to_i        # => 1

or

Integer(1.0)  # => 1
Integer(1)    # => 1

respondido 08 nov., 11:23

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.