introduction to ruby Flashcards

1
Q

History of ruby:
What was ruby influenced by?

A

•It was also influenced by Eiffel and Lisp, Perl with Smalltalk-like features.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is Ruby?​

A

Ruby is a dynamic, reflective, general-purpose object-oriented programming language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Ruby and Java Comparison

A

•Ruby

sleep 100

•Java

public class sleep{

public static void main (String[] args) throws InterruptedException {

Thread.sleep (100*1000);
}
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Who was the designer of Ruby?

A

Ruby was first designed and developed in the mid-1990s by Yukihiro “Matz” Matsumoto in Japan.”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The ruby language syntax is sensitive to the…

A

capitalization of identifiers, in all cases treating capitalized variables as constants.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

•The sigils $ and @ do not indicate variable data type as in Perl, but rather….

A

function as scope resolution operators.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

•One of ruby’s features is that it is thoroughly object-oriented with _____ , ______ , _______

A

inheritance mixins and metaclasses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Duck typing?

A

you don’t need a type in order to invoke an existing method on an object - if a method is defined on it, you can invoke it.

The name comes from the phrase “If it looks like a duck and quacks like a duck, it’s a duck”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Dynamic typing?

A

Dynamic typing just says that types are associated with run-time values, not with static variables and parameters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Everything is an _________ (even statements) and everything is executed imperatively (even _________)

A

•Everything is an expression (even statements) and everything is executed imperatively (even declarations)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A ruby feature is that Succinct and flexible _____ that minimizes ______________ and serves as a foundation for _______________ languages.

A

Succinct and flexible syntax that minimizes syntactic noise and serves as a foundation for domain-specific languages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Ruby features: Dynamic _________ and ________ of objects to facilitate ______________

A

Dynamic reflection and alteration of objects to facilitate metaprogramming

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Ruby features: ___________, _________ and _________, with a unique block syntax

A

Lexical closures, iterators and generators, with a unique block syntax

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Ruby feature: Literal notation for ______, ______, ________________ and _______

A

Literal notation for arrays, hashes, regular expressions and symbols

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Ruby feature: •Embedding code in _______(interpolation)

A

Ruby feature: •Embedding code in strings (interpolation)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Ruby features: _______arguments

A

Default arguments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Ruby features: •________ collection

A

Garbage collection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Ruby features: •Four levels of variable scope (_____, ______, __________, and ______) denoted by sigils or the lack thereof

A

•Four levels of variable scope (global, class, instance, and local) denoted by sigils or the lack thereof

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Ruby features: Strict ________ rules (everything is _____except ____and ___)

A

Strict boolean coercion rules (everything is true except false and nil)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Ruby features: __________ continuations

A

First-class continuations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Ruby features: ________ handling

A

Exception handling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Ruby features: ________ overloading

A

Operator overloading

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Ruby features: Built-in support for ________numbers, ________ numbers and ________ arithmetic

A

Built-in support for rational numbers, complex numbers and arbitrary-precision arithmetic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Ruby features: Custom dispatch behavior (through : ________and : ________)

A

Ruby features: Custom dispatch behavior (through method_missing and const_missing)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Ruby features: Native ________ and cooperative ________ (________are 1.9/YARV feature)

A

•Native threads and cooperative fibers (fibers are 1.9/YARV feature)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Ruby features: Initial support for ________ and multiple character ________ (no ICU support)

A

•Initial support for Unicode and multiple character encodings (no ICU support)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Ruby features: ________on all major platforms

A

Implemented on all major platforms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Ruby features:Native plug-in ____in __

A

•Native plug-in API in C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Ruby features:Large standard ________

A

•Large standard library

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Ruby deviations:_________ evaluation of non-boolean data is strict: 0, “” and [] are all evaluated to true.

A

Boolean evaluation of non-boolean data is strict: 0, “” and [] are all evaluated to true.

–Only false and nil are FALSE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Ruby deviations: To denote a _________ without a decimal component, one must follow with a ________ (99.0) or an explicit conversion (____). It is ________ to append a dot (99.) since numbers are susceptible to _____ _____.

A

•To denote a floating point without a decimal component, one must follow with a zero digit (99.0) or an explicit conversion (99.to_f). It is insufficient to append a dot (99.) since numbers are susceptible to method syntax.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Variables always hold _________ to objects.

A

Variables always hold references to objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Ruby is object-oriented: every value is an ______, including classes and ________ of types that many other languages designate as ______ (such as integers, booleans, and “null”).

A

•Ruby is object-oriented: every value is an object, including classes and instances of types that many other languages designate as primitives (such as integers, booleans, and “null”).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Every function is a _____ and ______ are always called on an ______.

A

•Every function is a method and methods are always called on an object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

Ruby features: Centralized package management through ________

A

•Centralized package management through RubyGems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

What are expressions in ruby?

A

•Expressions are Objects and return values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

Methods defined at the top level _____ become members of the _____ class. Since this class is an ancestor of every other class, such methods can be called on any object.

A

•Methods defined at the top level scope become members of the Object class. Since this class is an ancestor of every other class, such methods can be called on any object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

Ruby outputs: All _______ also have an “inspect” method

–Includes list of _____ variables

A

•All Object’s also have an “inspect” method

–Includes list of instance variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

Ruby outputs: All Object’s have a “to_s” ______

And you probably want to define one for your _____

A

•All Object’s have a “to_s” method

–And you probably want to define one for your objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

Ruby methods: Has a “______” statement

A

Has a “return” statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

Ruby methods: Take ________

A

Take arguments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

Ruby methods: Between “___” “___” pairs

A

•Between “def” “end” pairs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

Ruby methods: But also returns last _________ ________

A

But also returns last expression evaluated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

Creating and Extending Objects in Ruby

A

obj = Object.new

def obj.talk

puts “I am an object”

end

obj.talk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

Objects have Identifiers

A

s1 = “Hello”

s2 = “Hello”

p s1.object_id

p s2.object_id

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

What does this output?

s1 = “Hello”

s2 = “Hello”

p s1.object_id

p s2.object_id

A

$ ruby ref.rb

70235101628760

70235101628740

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

Passing Parameters

A

obj = Object.new

def obj.c2f(c)

c * 9.0 / 5 + 32

end

p obj.c2f(100)

p obj.c2f 100

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

What does this output?

obj = Object.new

def obj.c2f(c)

c * 9.0 / 5 + 32

end

p obj.c2f(100)

p obj.c2f 100

A

$ ruby ref.rb

  1. 0
  2. 0
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

Optional Arguments

A

obj = Object.new

def obj.multi(*x)

p x

end

obj. multi()
obj. multi(1)
obj. multi(1,2,3)

50
Q

What does this output?

obj = Object.new

def obj.multi(*x)

p x

end

obj. multi()
obj. multi(1)
obj. multi(1,2,3)

A

$ ruby ref.rb

[]

[1]

[1, 2, 3]

51
Q

Ending Optional Arguments

A

obj = Object.new

def obj.optional(a,b,*c)

p a,b,c

end

obj. optional(1, 2)
obj. optional(1, 2, 3)
obj. optional(1, 2, 3, 4)

52
Q

What does this code output?

obj = Object.new

def obj.optional(a,b,*c)

p a,b,c

end

obj. optional(1, 2)
obj. optional(1, 2, 3)
obj. optional(1, 2, 3, 4)

A

$ ruby ref.rb

1

2

[]

1

2

[3]

1

2

[3, 4]

53
Q

Default Arguments

A

obj = Object.new

def obj.default(a,b=3)

p “#{a}, #{b}”

end

obj. default(1)
obj. default(1,4)

54
Q

What is the output of this code?

obj = Object.new

def obj.default(a,b=3)

p “#{a}, #{b}”

end

obj. default(1)
obj. default(1,4)

A

$ ruby ref.rb

“1, 3”

“1, 4”

55
Q

List Ruby variables

A
  • Locals: start with lowercase or underscore
  • Instance: start with ‘@’
  • Class: start with ‘@@’
  • Globals: start with ‘$’
  • Constants begin with uppercase
56
Q

Local Variables

A

•Locals: start with lowercase or underscore

57
Q

Instance Variables

A

•Instance: start with ‘@’

58
Q

Class Variables

A

•Class: start with ‘@@’

59
Q

Global Variables

A

•Globals: start with ‘$’

60
Q

Constant Variables

A

•Constants begin with uppercase

61
Q

All Variables are References

A

•All Variables are References

–No base types as in other language (e.g. integer, float, string, etc.)

•Refer to Objects

62
Q

All Variables are References

a = “Hello”

b = a

p a

p b

b = “Goodbye”

p a

p b

What does this output?

A

$ ruby ref.rb

“Hello”

“Hello”

“Hello”

“Goodbye”

63
Q

Aliases

a = “Hello”

b = a

p a

p b

a.replace(“Yo”)

p a

p b

What does this output?

A

$ ruby ref.rb

“Hello”

“Hello”

“Yo”

“Yo”

64
Q

Freeze Method

a = “Hello”

a. freeze
a. replace(“Yo”)

What will happen when we run this code?

A

$ ruby ref.rb

ref.rb:3:in `replace’: can’t modify frozen String (RuntimeError)

from ref.rb:3:in `<main>’</main>

65
Q

Ruby Classes

A
  • Class names are constants
  • Define methods/messages
  • Can reopen
  • Can override
66
Q

Override

class A

def m

“one”

end

def m

“two”

end

end

p A.new.m

What will this happen?

A

$ ruby ref.rb

“two”

67
Q

Reopen

class A

def m

“one”

end

def m

“two”

end

end

p A.new.n

What will this code output?

A

$ ruby ref.rb

ref.rb:10:in <main>': undefined method n’ for #<0x007f89f411cfd0> (NoMethodError)0x007f89f411cfd0></main>

68
Q

Reopen

What will this code output?

A

$ ruby ref.rb

“two”

“three”

69
Q

Initializers and Accessors

class B

def initialize(a, b)

@one = a

@two = b

end

def one

@one

end

def two

@two

end

end

b = B.new(1, 2)

p b.one

p b.two

What will this code output?

A

$ ruby ref.rb

1

2

70
Q

Attribute Reader

class C

attr_reader :one, :two

def initialize(a,b)

@one = a

@two = b

end

end

c = C.new(3,4)

p c.one

p c.two

What will this output?

A

$ ruby ref.rb

3

4

71
Q

Writing and Both methods

A

•attr_writer and attr_accessor

72
Q

Ruby inheritance

A

•Single

–Like Java, unlike C++

•Receives all functionality from base (parent) class

–Can call base class function of the same name by “super”

  • Adds specificity
  • Modules

–“Mix ins”

73
Q

Inheritance Code

A

class Human

attr_reader :personality, :income

def initialize(p, i)

@personality = p

@income = i

end

end

class Programmer < Human

def initialize(p, i)

super(p-100, i+100)

end

end

74
Q

Superclasses

A

>> Programmer.superclass

=> Human

>> Programmer.superclass.superclass

=> Object

75
Q

Class Variables and Methods

A
  • Variables or methods where only one exists per class
  • Every object of the class shares them
76
Q

Class Variable

class Number

@@count = 0

def initialize(val)

@val = val

@@count = @@count + 1

end

def Number.count

@@count

end

end

a = Number.new(1)

b = Number.new(11)

c = Number.new(111)

p Number.count

What will this output?

A

$ ruby ref.rb

3

77
Q

“Constant”

Z = 1

p Z

Z = 2

p Z

What will this output?

A

$ ruby ref.rb

1

ref. rb:3: warning: already initialized constant Z
ref. rb:1: warning: previous definition of Z was here

2

78
Q

3 Ruby Constants concepts

A
  • Constants defined within a class or module may be accessed anywhere within the class or module.
  • Outside the class or module, they may be accessed using the scope operator, :: prefixed by an expression that returns the appropriate class or module.
  • Constants defined outside any class or module may be accessed as it is or by using the scope operator with no prefix.
79
Q

2 Ruby constants

A
  • Constants may not be defined in methods.
  • Constants may be added to existing classes and modules from the outside by using the class or module name and the scope operator before the constant name.
80
Q

Class Methods

What will this output?

A

<0x007ffb3c84c940>0x007ffb3c84c940>

$ ruby ref.rb

main

C

C

81
Q

Scope

class A p A::X

X=1 p A::B::X

class B p A::B::C::X

X=2

class C

X=3

end

end

end

What will this output?

A

$ ruby ref.rb

1

2

3

82
Q

Inherited Class Variables

What will this output?

class Parent

@@age = 40

def age

@@age

end

end

class Child < Parent

@@age = 10

end

p Parent.new.age

A

$ ruby ref.rb

10

83
Q

Private and Protected

What will this output?

A

$ ruby ref.rb

“yep”

“derived”

ref.rb:25:in <main>': private method nope’ called for #<0x007fb869994408> (NoMethodError)0x007fb869994408></main>

84
Q

Conditionals

A
  • if/else/elsif/end
  • if not (x ==1)
  • if !(x==1)
  • unless x==1/else/end
  • puts x if x>0
  • puts x unless x == 0
85
Q

Allocation in Conditionals

if false

x = 1

end

p x

p y

What will this output?

A

$ ruby ref.rb

nil

ref.rb:5:in <main>': undefined local variable or method y’ for main:Object (NameError)</main>

86
Q

Assignment in Conditionals

if x = 1

p “Hi”

end

What will this output?

A

$ ruby ref.rb

ref.rb:1: warning: found = in conditional, should be ==

“Hi”

87
Q

Operator Override

class Person

attr_reader :name, :age

def initialize(name,age)

@name = name

@age = age

end

def ==(other)

self.age == other.age

end

end

person1 = Person.new(“Alice”, 50)

person2 = Person.new(“Bob”, 50)

person3 = Person.new(“Alice”, 40)

p person1 == person2

p person1 == person3

What will this output?

A

$ ruby ref.rb

true

false

88
Q

Case

a = “This”

case a

when “That”

p “I’m a that”

when “This”

p “I’m a this”

else

p “I’m neither”

end

What will this output?

A

$ ruby ref.rb

“I’m a this”

89
Q

Override When’s “===“

class Person

attr_reader :name, :age

def initialize(name,age)

@name = name

@age = age

end

def ===(other)

self.age == other.age

end

end

person1 = Person.new(“Alice”, 50)

person2 = Person.new(“Bob”, 50)

def Person.compare(p1, p2)

print “#{p1.name} and #{p2.name}”

case p1

when p2

print “ are “

else

print “ aren’t “

end

print “the same\n”

end

Person.compare(person1, person2)

Person.compare(person1, person3)

What will this output?

A

$ ruby equal.rb

Alice and Bob are the same

Alice and Alice aren’t the same

90
Q

Else in Case

5.times do |i|

case i

when 1

p “one”

when 2

p “two”

else

p i

end

end

What will this output?

A

0

“one”

“two”

3

4

91
Q

Loops

n = 0

loop do

n = n + 1

puts n

break if n > 5

end

What will this output?

A

1

2

3

4

5

6

92
Q

While

n = 0

while n < 5

n = n + 1

puts n

end

What will this output?

A

1

2

3

4

5

93
Q

Begin/While

n = 0

begin

n = n + 1

puts n

end while n < 5

What will this output?

A

1

2

3

4

5

94
Q

Until

n = 0

until n > 5

n = n + 1

puts n

end

What will this output?

A

1

2

3

4

5

6

95
Q

Iterating on Lists

c=[“one”, “two”, “three”, “four”, “five”]

for i in c

puts i

end

What will this output?

A

$ ruby ref.rb

one

two

three

four

five

96
Q

3 loop features

A
  • Loops really just repeatedly execute code blocks
  • I.e.: they are iterators
  • Iterators repeatedly “yield” to code blocks
97
Q

Code Blocks

A
  • Defined inside “{}”or “do”
  • Passed as parameters
  • Called via “yield”
98
Q

Blocks and Iterators

curlies when something is returned

puts [1,2,3].map {|n| n*10}

do when nothing is returned

[1,2,3].map do |n|

puts n*10

end

What will this output?

A

$ ruby ref.rb

10

20

30

10

20

30

99
Q

my_times method

class Integer

def my_times

c = 0

while c < self

yield c

c += 1

end

self

end

end

a = 0.my_times {|i| p i}

puts “a = #{a}”

a = 5.my_times {|i| p i}

puts “a = #{a}”

a = -5.my_times {|i| p i}

puts “a = #{a}”

What will this output?

A

$ ruby ref.rb

a = 0

0

1

2

3

4

a = 5

a = -5

100
Q

Exceptions

begin

a = 1 / 0

rescue ZeroDivisionError => e

puts e.message

puts e.backtrace

end

What will this output?

A

$ ruby ref.rb

divided by 0

ref. rb:2:in /' ref. rb:2:in <main>’</main>

101
Q

Ruby Symbols

A
  • Begin with ‘:’
  • More similar to integers than strings
  • Are immutable
  • Are unique
  • Used to refer to methods
  • Often used in hashes
102
Q

Symbol Example

p “abc”.object_id

p “abc”.object_id

p :abc.object_id

p :abc.object_id

What will this output?

A

$ ruby ref.rb

70190050355780

70190050355680

407688

407688

103
Q

Numbers

A

•Numeric

–Float

–Integer

  • Fixnum
  • Bignum
104
Q

Hashes

A
  • Key/value pairs
  • Use “{}” as literal
105
Q

Hashing

hash = {

“red” => “ruby”,

“white” => “diamond”,

“green” => “emerald”

}

hash.each_with_index do

|(key,value),i|

puts “#{i} is #{key} => #{value}”

end

What will this output?

A

$ ruby ref.rb

0 is red => ruby

1 is white => diamond

2 is green => emerald

106
Q

Older Symbol

A

hash = {

:red => “ruby”,

:white => “diamond”,

:green => “emerald”

}

107
Q

Newer Symbol

A

hash = {

red: “ruby”,
white: “diamond”,
green: “emerald”

}

108
Q

Array Initialization

A

>> Array.new(3)

=> [nil, nil, nil]

>> Array.new(3, “Hi”)

=> [“Hi”, “Hi”, “Hi”]

>> n = 0

=> 0

>> Array.new(3){n+=1; n*10}

=> [10, 20, 30]

109
Q

More Array Initialization​

A

>> a = Array.new(3, “Hi”)

=> [“Hi”, “Hi”, “Hi”]

>> a[0].object_id

=> 2189467100

>> a[1].object_id

=> 2189467100

>> a[2].object_id

=> 2189467100

>> a[0].replace(“Bye”)

=> “Bye”

>> a

=> [“Bye”, “Bye”, “Bye”]

110
Q

Array Methods

a = [1, 2, [3, 4], [[5, 6], [7, 8]]]

p a.flatten

p a.reverse

p [1, 2, 3, 3, 3, 4, 1].uniq

p [“2”, 1, 5, “3”, 4, “6”].sort_by {|a| a.to_i}

What will this output?

A

$ ruby ref.rb

[1, 2, 3, 4, 5, 6, 7, 8]

[[[5, 6], [7, 8]], [3, 4], 2, 1]

[1, 2, 3, 4]

[1, “2”, “3”, 4, 5, “6”]

111
Q

Ranges

p (1..5).include?(5)

p (1…5).include?(5)

r = 1..10

p r.one? {|n| n == 5}

p r.any? {|n| n > 5}

p r.count {|n| n > 5}

p r.find_all {|n| n > 5}

What will this out?

A

$ ruby ref.rb

true

false

true

true

5

[6, 7, 8, 9, 10]

112
Q

Global Regular Expression Print

misc=[75, “hello”, 10…20, “goodbye”]

p misc.grep(String)

p misc.grep(/o/)

p misc.grep(50..100)

p misc.grep(Fixnum)

p misc.grep(Integer)

What will this output?

A

$ ruby ref.rb

[“hello”, “goodbye”]

[“hello”, “goodbye”]

[75]

[75]

[75]

113
Q

Each Takes an Array and a Block

[1,2,3].each {|i| puts “Received #{i}”}

A

$ ruby ref.rb

Received 1

Received 2

Received 3

114
Q

Map

A

•Takes an array and returns an array

>> numbers = [“one”, “two”, “three”, “four”, “five”]

=> [“one”, “two”, “three”, “four”, “five”]

>> numbers.map {|number| number.capitalize}

=> [“One”, “Two”, “Three”, “Four”, “Five”]

115
Q

Proc’s

A
  • Ruby has first-class code blocks called “Proc”s
  • Are a combination of code and context
  • Proc’s can be assigned to variables, be array elements, etc., etc.
  • Can be used for closures
116
Q

Closure

def multiply_by(m)

Proc.new {|x| x * m}

end

p10 = multiply_by 10

p12 = multiply_by 12

p p10.call(10)

p p10.call(11)

p p12.call(1)

p p12.call(6)
What does this output?

A

$ ruby ref.rb

100

110

12

72

117
Q
A
118
Q

Another Closure

def make_counter

n = 0

Proc.new { n += 1 }

end

c1 = make_counter

c2 = make_counter

p c1.call

p c1.call

p c1.call

p c2.call

p c1.call

p c2.call

What does this ooutput?

A

$ ruby ref.rb

1

2

3

1

4

2

119
Q

Ruby features: Interactive ________(a REPL (________/________/________)) – IRB

A

•Interactive Ruby Shell (a REPL (Read/Execute/Print Loop)) – IRB

120
Q
A
121
Q
A