Ruby Interview Questions And Answers

Ruby Interview Questions list for experienced

  1. What is Rails?
  2. Describe class libraries in Ruby.
  3. Explain the concepts and capabilities of garbage collection feature of Ruby.
  4. Describe the environment variables present in Ruby.
  5. Interpolation is a very important process in Ruby, comment.
  6. What is the use of super in Ruby Rails?
  7. What is the use of load and require in ruby?
  8. Explain the use of global variable $ in Ruby
  9. Explain the difference between nil and false in ruby.
  10. What is the use of Destructive Method?
  11. What is the Notation used for denoting class variables in Ruby?
  12. What is the naming conventions for methods that return a boolean result?
  13. Explain about interpolation?
  14. Explain about methods?
  15. How do you write to STDOUT in Ruby?
  16. Explain about Float, Dig and Max?
  17. Explain about ruby code blocks?
  18. Explain about portability?
  19. Explain about the defined operator?
  20. Explain about normal method class?
  21. What two delimiters are used for blocks?
  22. How does ruby deal with extremely large numbers?
  23. What?s the difference in scope for these two variables: @name and @@name?
  24. Explain about ruby names?
  25. How do you capitalize all characters in a string?
  26. Explain about environment variables present in ruby?
  27. Explain about garbage collection feature of ruby?
  28. Explain about the command line options?
  29. How do you comment out a block of code?
  30. Explain about variables?
  31. Explain about Class variable and global variable?
  32. What is XML?
  33. How do the following methods differ: @my_string.strip and @my_string.strip! ?
  34. What are the different views in UML?
  35. Define SDLC in UML?

Ruby interview questions and answers on advance and basic Ruby with example so this page for both freshers and experienced condidate. Fill the form below we will send the all interview questions on Ruby also add your Questions if any you have to ask and for apply in Ruby Tutorials and Training course just send a mail on info@pcds.co.in in detail about your self.

Top Ruby interview questions and answers for freshers and experienced

What is Ruby ?

Answer : Ruby is a multi-platform open-source dynamic object-oriented interpreted language created by Yukihiro Matsumoto (Matz) in 199

Questions : 1 :: What is Rails?

Ruby on Rails is an open source web application framework for the Ruby programming language............

Questions : 2 :: Describe class libraries in Ruby.

The Ruby standard library extends the foundation of the Ruby built-in library with classes and abstractions for a variety of programming needs, including network programming, operating system...View answers

Questions : 3 :: Explain the concepts and capabilities of garbage collection feature of Ruby.


Garbage collection is the process of reclaiming the memory space. Ruby avoids memory leaks at a great extent. Ruby performs garbage collection automatically. The memory resource management for...View answers

Questions : 4 :: Describe the environment variables present in Ruby.

Environment variables can be directly accessed by using ENV hash. Environment variables can be directly read or written to by using the index operator supplied with a string argument. The child...View answers

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

Inserting a string into a literal is called as interpolation. Interpolation is a very important process in Ruby. Interpolation can be done by using only one way by embedding # within {}. A new name...View answers

Questions : 6 :: What is the use of super in Ruby Rails?


The function super is used to invoke the original method, searching of the method body starts in the super class of the object that was found to contain the original method. The following example...View answers

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

The ‘load’ and ‘require’ both are used for loading the available code into the current code. ‘load’ always reloads the code every time. Autoload is always sounds...View answers

Questions : 8 :: Explain the use of global variable $ in Ruby

The global variable is declared with $ prepended. It has full scope in the application. These variables can be used anywhere within an application. For Example: $departmentName =...View answers

Questions : 9 :: Explain the difference between nil and false in ruby.


The differences of the methods nil and false are: - nil cannot be a value, where as a false can be a value - A method returns true or false in case of a predicate, other wise nil is returned. -...View answers

Questions : 10 :: What is the use of Destructive Method?

In ruby, we conventionally attach '!' or '?' to the end of certain method names. The exclamation point (!, sometimes pronounced aloud as "bang!") indicates something potentially destructive,...View answers

Questions : 11 :: What is the Notation used for denoting class variables in Ruby?

1) a constant begins with an uppercase letter and it should not be defined inside a method 2) a local must begin with a lowercase letter or the _ underscore sign 3) a global begins with the $ sign;...View answers

Questions : 12 :: What is the naming conventions for methods that return a boolean result?

Methods that return a boolean result are typically named with a ending question mark. For example: def active? return true #just always returning...View answers

Questions : 13 :: Explain about interpolation?

Interpolation is a very important process in Ruby. Interpolation is the process of inserting a string into a literal. There is only one way in which you can interpolate a string into a literal by...View answers

Questions : 14 :: Explain about methods?

Methods in ruby basically perform two functions, named operation and the code present in the class which does a specific function. In Ruby all your algorithms live in methods which inturn is present...View answers

Questions : 15 :: How do you write to STDOUT in Ruby?

Actually two methods are available: puts writes with a newline print writes without a newline     We use print / puts methods to print something.. Difference between print and...View answers

Questions : 16 :: Explain about Float, Dig and Max?

Float class is used whenever the function changes constantly. It acts as a sub class of numeric. They represent real characters by making use of the native architecture of the double precision...View answers

Questions : 17 :: Explain about ruby code blocks?

Ruby code blocks form an important part of ruby and are very fun to use. With the help of this feature you can place your code between do-end and you can associate them with method invocations and...View answers

Questions : 18 :: Explain about portability?

Ruby language can be ported to many platforms. Ruby programs can be ported to many platforms without any modification to the source code. This feature made the language very useful and highly used by...View answers

Questions : 19 :: Explain about the defined operator?

Define operator defines whether a passed expression is defined or not. If the expression is defined it returns the description string or null if the expression is not defined. If a variable is...View answers

Questions : 20 :: Explain about normal method class?

This function calls a method and it can take any number of arguments and expr. Make sure that you put an asterisk or an ampersand before the expression. Last expr argument can be declared with a hash...View answers

Questions : 21 :: What two delimiters are used for blocks?

Curly braces {?} and ?do???end? Bonus: coding convention is to use curly braces if the code will fit on one line and ?do???end? syntax if the block contains multiple lines.

Questions : 22 :: How does ruby deal with extremely large numbers?

Unlike other programming languages ruby deals with extremely large numbers it doesn?t have any barriers. There is no limit on the extent of limit of number usage. Ruby performs this function with two...View answers

Questions : 23 :: What?s the difference in scope for these two variables: @name and @@name?

@name is an instance variable and @@name is a class variable

Questions : 24 :: Explain about ruby names?

Classes, variables, methods, constants and modules can be referred by ruby names. When you want to distinguish between various names you can specify that by the first character of the name. Some of...View answers

Questions : 25 :: How do you capitalize all characters in a string?

?this is my string?.upcase If the string is in a variable: @my_string.upcase Note: The method: upcase! is another alternative. See next question regarding methods that end with an...View answers

Questions : 26 :: Explain about environment variables present in ruby?

Following are some of the environment variables used to control the behavior programming of ruby. While programming ENV object lists some of the current variables. RUBYLIB path searches for...View answers

Questions : 27 :: Explain about garbage collection feature of ruby?

Ruby is an object oriented language and every object oriented language tends to allocate many objects during execution of the program. Ruby deletes unallocated and unused objects automatically. This...View answers

Questions : 28 :: Explain about the command line options?

Ruby`s language is executed from the command line like most of the scripting languages. Programming and behavior language environment can be controlled from the interpreter itself. Some of the...View answers

Questions : 29 :: How do you comment out a block of code?

Use =begin and =end. =begin def my_commented_out_method end =end You could use successive # signs, but that?s just tedious: # # def my commented_out_method #...View answers

Questions : 30 :: Explain about variables?

There are four different types of variables they are local, instance, global, and class. Variables can be used in the program without any declaration and they can contain data of any type. A local...View answers

Questions : 31 :: Explain about Class variable and global variable?

A class variable starts with an @@ sign which is immediately followed by upper or lower case letter. You can also put some name characters after the letters which stand to be a pure optional. A class...View answers

Questions : 32 :: What is XML?

Ruby code blocks form an important part of ruby and are very fun to use. With the help of this feature you can place your code between do-end and you can associate them with method invocations and...View answers

Questions : 33 :: How do the following methods differ: @my_string.strip and @my_string.strip! ?

The strip! method modifies the variable directly. Calling strip (without the !) returns a copy of the variable with the modifications, the original variable is not...View answers

Questions : 34 :: What are the different views in UML?

Use Case view - Presents the requirements of a system.  .Design View - Capturing the vocabulary.  .Process View - Modeling the systems processes and threads.  .Implementation view -...View answers

Questions : 35 :: Define SDLC in UML?

.Use Case view - Presents the requirements of a system.  .Design View - Capturing the vocabulary.  .Process View - Modeling the systems processes and threads.  .Implementation view...View answers
More Question

Ask your interview questions on Ruby

Write Your comment or Questions if you want the answers on Ruby from Ruby Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---