Lesson 1.6: Differences Between Ruby Versions Flashcards

1
Q

Deprecated technologies

A

…are technologies which have been replaced by newer technologies. Features typically get marked as “deprecated”, rather than simply removed, in order to provide backward compatibility for software users.

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

String#each

A

If you look at the Ruby 1.8.7 documentation you can still see an explanation of this method. In Ruby 1.9.0, String#each was deprecated. Thus, we can no longer use this method with later versions.

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

Array#to_h

A

to_h –> hash # to h returns a hash
to_h { block } –> hash #returns the result of interpreting ary as an array of key-value pairs.

If you look at the Ruby 2.0.0 documentation for Array, you won’t find #to_h in the list of methods, but in the Ruby 2.1.0 documentation, it is listed.

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