Sort 43 Discussions, By:
Please Login in order to post a comment
The fact that range? is a method that you have defined here (in a very hidden way, no less) is extermely confusing. Especially since Ruby has ranges in the std lib. I have 10 years of ruby experience and this question tripped me up. I was off searching docs for the ruby range? method assuming that "already defined" meant "a part of ruby". You need to find a much better way to present the topic of a method taking multiple arguments than this.
It would be nice if the editor contained the whole program, not just the line we need to edit.
Being able to view the whole program would give us a more effective way to learn Ruby in its greater context, including what this line of code does. As it's presented to the end user, it's just a blind "copy/paste fire and forget, and have blind faith that everything works without needing to understand any of it".
The test for this lab needs to be fixed due to new ruby verision "constant ::Fixnum is deprecated"
Wow this question is horribly worded and put together. Took me forever to find out that all I had to do was type in the hint. I was off creating my own methods and solving for STDIN.
# write your code here
iter = gets().chomp()
iter = iter.to_i
for loop in 1..iter
line = gets.chomp().split(" ")
a = line.to_i
b = line.to_i
c = line.to_i
**The above code gives error online which is pretty weird
solution.rb:1: warning: constant ::Fixnum is deprecated
solution.rb:13:in range_call': undefined methodchomp' for nil:NilClass (NoMethodError)
from solution.rb:27:in block in <main>'
from solution.rb:25:in `'
range_call': undefined method
block in <main>'