add all chapter 01's ruby version code based on python's
Merge pull request #126 from RONGHAI/master

add all chapter 01's ruby version code based on python's