What is the use of $ in ruby?



What is the use of $ in ruby?..

Answer / Milky Sodhi

$ in Ruby represents global variables, which are accessible from anywhere in your script. They are declared without a variable name.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby on Rails Interview Questions

What are the hashes?

1 Answers  


Tell me what is orm (object-relationship-model) in rails?

1 Answers  


Tell me what is the function of garbage collection in ruby on rails?

1 Answers  


What is the difference between render and redirect?

1 Answers  


Tell me what is coc in rails?

1 Answers  


What is the difference between delete and destroy ?

1 Answers  


Are there any disadvantages of ruby on rails? If yes, mention them.

1 Answers  


How is direct different from render?

1 Answers  


What is rails active record?

1 Answers  


Mention all the naming conventions in ruby on rails.

1 Answers  


What are the types of caching used in rails, what are they?

1 Answers  


The string can be represented in single as well as double quotes. What is the difference between the two?

1 Answers  


Categories