- Home
- Interview Questions
- Ruby and Rails
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 feature can be controlled by applying proper syntax and program through 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 services, threads, and more.
These classes provide flexible capabilities at a high level of abstraction, giving you the ability to create powerful Ruby scripts useful in a variety of problem domains.
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 variable contains lower case characters followed by name characters. Instance variable starts with a @ sign followed by name characters.
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 many programmers worldwide. Some of the platforms used are DOS, UNIX, WINDOWS, etc.
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 commands which are used are as follows -d, -h, -e prog, -v, - T, -r lib, etc.