Tell me what is the difference between Ruby 1.9 and Ruby 2.0?
Submitted by: MuhammadRuby 2.0 differs in various ways, such as:
FASTER
Ruby 2 has a few patches that dramatically improve performance. The biggest of these is a substantial optimization to Kernel#require, which speeds up Rails startup dramatically. Ruby 2 also has improved GC, VM optimizations, and improvements to floating point operations.
UTF-8 BY DEFAULT
All Ruby scripts now default to UTF-8 encoding. This makes the #encoding: utf-8 magic comment no longer necessary.
LITERAL SYMBOL ARRAY SYNTAX
You can now use %i and %I to make an array of symbols:
LAZY ENUMERATORS
Ruby 2 introduces the concept of a lazy Enumerable object. A lazy Enumerable will not consume excess memory, and will process individual elements as needed instead of the entire array/range passed to it.
Submitted by: Muhammad
FASTER
Ruby 2 has a few patches that dramatically improve performance. The biggest of these is a substantial optimization to Kernel#require, which speeds up Rails startup dramatically. Ruby 2 also has improved GC, VM optimizations, and improvements to floating point operations.
UTF-8 BY DEFAULT
All Ruby scripts now default to UTF-8 encoding. This makes the #encoding: utf-8 magic comment no longer necessary.
LITERAL SYMBOL ARRAY SYNTAX
You can now use %i and %I to make an array of symbols:
LAZY ENUMERATORS
Ruby 2 introduces the concept of a lazy Enumerable object. A lazy Enumerable will not consume excess memory, and will process individual elements as needed instead of the entire array/range passed to it.
Submitted by: Muhammad
Read Online Ruby Developer Job Interview Questions And Answers
Top Ruby Developer Questions
☺ | Tell us what is class libraries in Ruby? |
☺ | Tell me can you call a private method outside a Ruby class using its object? |
☺ | Explain me what is the function of ORM in Ruby on Rails? |
☺ | Tell me the role of modules and mixins in Ruby? |
☺ | What is the difference extend and include? |
Top Web Developer Categories
☺ | Bootstrap Interview Questions. |
☺ | Front End Web Developer Interview Questions. |
☺ | Typography Interview Questions. |
☺ | Laravel PHP Developer Interview Questions. |
☺ | Junior Developer PHP Interview Questions. |