- Joined
- Sep 9, 2014
- Messages
- 38
- Reaction score
- 1
- First Language
- English
- Primarily Uses
Hi guys, I'm learning ruby and trying out the exercise from
https://www.ruby-lang.org/en/documentation/quickstart/2/
I encountered a problem.
irb(main):015:0> def h(name)irb(main):016:1> puts "Hello #{name}!"irb(main):017:1> end=> :hDoing this gets me inconsistent results. Sometimes after the third line 'end', i do not get a => :h back, meaning ruby didn't register what i wrote earlier. I checked each time to ensure the first 2 lines I input is the exact same with no character incorrect but I get different results some of the time.
Anyone knows what's going on?
((
https://www.ruby-lang.org/en/documentation/quickstart/2/
I encountered a problem.
irb(main):015:0> def h(name)irb(main):016:1> puts "Hello #{name}!"irb(main):017:1> end=> :hDoing this gets me inconsistent results. Sometimes after the third line 'end', i do not get a => :h back, meaning ruby didn't register what i wrote earlier. I checked each time to ensure the first 2 lines I input is the exact same with no character incorrect but I get different results some of the time.
Anyone knows what's going on?

