What is the scope of a local variable in ruby?
Answer / Deepika Sengar
In Ruby, local variables have block scope. This means they are accessible within the same method or block they were defined unless explicitly declared as global (using $ before variable name).
| Is This Answer Correct ? | 0 Yes | 0 No |
what is the difference between a gem and a plugin in Ruby?
Are numeric objects mutable in ruby?
Explain class libraries in ruby.
Explain raise statement in Ruby?
What is rvm?
Difference between nil and false in ruby?
how many ways you can create a concatenating string?
What are the case statement in ruby?
What does mri most commonly stand for?
Explain ampersand parameter (&block) in Ruby?
What are the looping structures available in ruby?
What is the difference between calling super and calling super()?