Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@bertfordseo:/home/rlankford/ruby/keyword# rvm use 1.8.7
- Using /usr/local/rvm/gems/ruby-1.8.7-p334
- root@bertfordseo:/home/rlankford/ruby/keyword# ruby -v
- ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux]
- root@bertfordseo:/home/rlankford/ruby/keyword# irb
- ruby-1.8.7-p334 :001 > string = "test
- ruby-1.8.7-p334 :002"> test
- ruby-1.8.7-p334 :003"> test"
- => "test\ntest\ntest"
- ruby-1.8.7-p334 :004 > string.split('\n')
- => ["test\ntest\ntest"]
- ruby-1.8.7-p334 :005 > string.each {|i| puts i}
- test
- test
- test
- => "test\ntest\ntest"
- ruby-1.8.7-p334 :006 > exit
- root@bertfordseo:/home/rlankford/ruby/keyword# rvm use 1.9.2
- Using /usr/local/rvm/gems/ruby-1.9.2-p180
- root@bertfordseo:/home/rlankford/ruby/keyword# ruby -v
- ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
- root@bertfordseo:/home/rlankford/ruby/keyword# irb
- ruby-1.9.2-p180 :001 > string = "test
- ruby-1.9.2-p180 :002"> test
- ruby-1.9.2-p180 :003"> test"
- => "test\ntest\ntest"
- ruby-1.9.2-p180 :004 > string.split('\n')
- => ["test\ntest\ntest"]
- ruby-1.9.2-p180 :005 > string.each {|i| puts i}
- NoMethodError: undefined method `each' for "test\ntest\ntest":String
- from (irb):5
- from /usr/local/rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `<main>'
- ruby-1.9.2-p180 :006 >
Add Comment
Please, Sign In to add comment