Home
41.
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 defined it gets initialized. If method_call is defined as true then method also gets defined. This is also the same case with super and yield.

42.
Explain about operators in Ruby?

Like all the modem languages Ruby supports many different operators to its credit. Most of the operators in Ruby are in fact methods due to the object oriented nature of the language. This feature gives Ruby an edge over its competitors. Semantics of these operators can be changed due to the object oriented nature of the language.

43.
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 libraries. Make sure that you separate each path with colons. RUBYOPT passes command line options to Ruby interpreter. There are many more which can be obtained by searching the huge pool of library.
44.
Explain the difference between nil and false in ruby?
False is a boolean datatype
Nil is not a data type .
45.
What is the use of load and require in ruby?

Require() 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. Loads() performs the inclusion operation once, it reprocesses the code every time load is called.