Lesson 1.6: Differences Between Ruby Versions Flashcards
Deprecated technologies
…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.
String#each
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.
Array#to_h
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.