This page is READ-ONLY. It is generated from the old site.
All timestamps are relative to 2013 (when this page is generated).
If you are looking for TeX support, please go to VietTUG.org

Ruby plus

Added by ruby over 1 year ago  »  Votes: 1/1

Let see the differences

1 irb> 65. + (20).chr                # some spaces before and after the operator
2 TypeError: String can't be coerced into Fixnum
3         from (irb):21:in `+'
4         from (irb):21
5         from /usr/bin/irb:12:in '<main>'
6 
7 irb> 65.+(20).chr                  # no space before/after the operator
8 => "U" 

Ruby is fun, isn't it ?


Comments