Ruby Programming Language Interview Questions and Answers

Ruby Questions and Answers:

1 :: Explain the difference between nil and false in ruby?

False is a boolean datatype
Nil is not a data type
4/5 Rating (1 vote)
Is This Answer Correct?    3 Yes 1 No
Place Your Answer

2 :: Explain the use of global variable $ in Ruby?

If you declare one variable as global we can access any where, where as class variable visibility only in the class
3/5 Rating (1 vote)
Is This Answer Correct?    3 Yes 0 No
Place Your Answer

3 :: What is the use of load and require in ruby?

Reuire() loads and processes the Ruby code from a separate file, including whatever classes, modules, methods, and constants are in that file into the current scope.
Load() performs the inclusion operation once, it reprocesses the code every time load is called.
3.5/5 Rating (2 votes)
Is This Answer Correct?    2 Yes 0 No
Place Your Answer

4 :: What is the use of super in Ruby Rails?

► Ruby uses the super keyword to call the superclass implementation of the current method.
► Within the body of a method, calls to super acts just like a call to that original method.
► The search for a method body starts in the superclass of the object that was found to contain the original method.
def url=(addr)
super (addr.blank? || addr.starts_with?('http')) ? addr : http://#{addr}
end
4.5/5 Rating (2 votes)
Is This Answer Correct?    3 Yes 0 No
Place Your Answer

5 :: Interpolation is a very important process in Ruby, comment.

► Interpolation is the process of inserting a string into a literal.
► You can interpolate a string into a literal by placing a Hash (#) within {} open and close brackets.
► This refers to a new name to by referring to the copy of the original method.
3.5/5 Rating (2 votes)
Is This Answer Correct?    3 Yes 0 No
Place Your Answer

Rate This Category:
4.5/5 Rating (2 votes)
Place Your Question



Top: Ruby Programming Language Interview Questions and Answers
Ruby Programming Language Interview Questions and Answers

Top Frequently Asked Ruby Question
Frequently Asked Ruby Job Interview Question


Top Frequently opened Computer Programming Job Interview categories
Most popular Computer Programming Job Interview categories

Comments About Ruby Programming Language Interview Questions and Answers

Share your valuable opinions, ideas and suggestions about Ruby Programming Language Interview Questions and Answers
While placing your comment your email address is required but won't be published any where else; Personal information will be kept confidential; we do not sell or release our respective visitors private information.
  1. Webmaster 23rd of May 2012

    Webmaster Said

    Tell us what you feel about Ruby Programming Language Interview Questions and Answers
    All comments will be published after review. No login or registration is required to post a comment on Ruby Programming Language Interview Questions and Answers We offer and invite you to submit your valuable comment now; Please be respectful of others when commenting. Insulting others, self-promotional comments, website promotional comments, marketing stuff, SEO Techniques, SMS-style content and off-topic comments will not be approved at this information portal.
    So start sharing your thoughts regarding Ruby Programming Language Interview Questions and Answers
    Thank you.

Leave a Comment

Leave a Comment
  1.  Enter This Verification Code  Regenerate Verification Code  



Your reply will be added to the comment above (Below any other replies to this comment) -

Top Comments About: Ruby Programming Language Interview Questions and Answers
Comments on Ruby Programming Language Interview Questions and Answers

 
Top of Link batk to Ruby Programming Language Interview Questions and Answers
Link batk to Ruby Programming Language Interview Questions and Answers