• ###### sonovagibscommented on "You're a square!" ruby solution

Im curious as to why we do not need to specify return "false" or "true" in this example?

• ###### juliangalardicommented on "You're a square!" ruby solution

Math is allowed, what you are getting is:
"Math::DomainError (Numerical argument is out of domain - "sqrt")"
you could use 'raise' to attend it or use logical expression to ensure the positive range of the number before use Math::sqrt

• ###### juliangalardicommented on "You're a square!" ruby solution

This comment is hidden because it contains spoiler information about the solution

• ###### KULKINGcommented on "You're a square!" ruby solution

Thanks for mentioning. I am new on this platform and didn't know the purpose of spoiler flag. Now I knnow. Thanks :)

• ###### Chrono79commented on "You're a square!" ruby solution

Use spoiler flag, please.

• ###### KULKINGcommented on "You're a square!" ruby solution

This comment is hidden because it contains spoiler information about the solution

• ###### KULKINGcommented on "You're a square!" ruby solution

You get this error when you pass a negative value to Math.sqrt. You can't pass negative to it.

• ###### FunkyQChickencommented on "You're a square!" ruby solution

i agree, for example 1e16+1 returns true when it shouldn't

• ###### cyril-lemairecommented on "Largest 5 digit number in a series" ruby solution

@Wei-LiangChew I'm a little late but then the while loop will iterate over with n - 1 = 8 (and so on)

• ###### siddharthkrishcommented on "You're a square!" ruby solution

hmm.. i kept getting sqrt error. not sure why. thought Math.sqrt isn't supported here.

• ###### Naypamcommented on "You're a square!" ruby solution

This comment is hidden because it contains spoiler information about the solution

• ###### Wei-LiangChewcommented on "Largest 5 digit number in a series" ruby solution

But what if the largest 5-digit number in `digits` doesn't start with 9?

• ###### ReganRyanNZcommented on "Snail" ruby solution

This is better than using array.shift because it leaves array unaltered.

Or do variables duplicate when put as arguments anyway?

• ###### maalurcommented on "Re-open class" kata

I'm going to say the same thing others have said...
I don't think it makes sense to disallow the use of alias_method if they aren't creating a unique method. This asks users to create an alias for a method while preventing them from using best practices. For newer programmers this could potentially teach them bad practices or confuse them on what the best practices are.

I recommend allowing the use of alias_method if the goal is to have users alias a method, or have them add a simple method like String#first or String#last to return the first or last character.

• ###### maalurcommented on "Largest 5 digit number in a series" ruby solution

This comment is hidden because it contains spoiler information about the solution