The following code is copied from the site - http://www.w3cschool.cc/ruby/ruby-object-oriented.html. Note, it is at the bottom. However, I got one error message during runing it.
成都創(chuàng)新互聯(lián)專注于安順企業(yè)網(wǎng)站建設(shè),自適應(yīng)網(wǎng)站建設(shè),成都商城網(wǎng)站開(kāi)發(fā)。安順網(wǎng)站建設(shè)公司,為安順等地區(qū)提供建站服務(wù)。全流程按需定制,專業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,成都創(chuàng)新互聯(lián)專業(yè)和態(tài)度為您提供的服務(wù)
#!/usr/bin/ruby -w
class Box
# 輸出類信息
puts "Type of self = #{self.type}"
puts "Name of self = #{self.name}"
end
The output error message:
D:\Ruby\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) D:/Ruby/RubyStudyPro/box.rb
D:/Ruby/RubyStudyPro/box.rb:4:in `
from D:/Ruby/RubyStudyPro/box.rb:2:in `
from -e:1:in `load'
from -e:1:in `
Process finished with exit code 1
Who could kindly give me some tips?