I'm trying out Ruby koans and found some tests using this _n_
, never seen it before what is it and how do I use it?
Example:
def test_objects_have_methods
fido = Dog.new
assert fido.methods.size > _n_
end
// John
Found it:
# Numeric replacement value.
def _n_(value=999999, value19=:mu)
if RUBY_VERSION < "1.9"
value
else
(value19 == :mu) ? value : value19
end
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With