From: Bino Oetomo Date: 2007-04-30T18:44:24+09:00 Subject: Re: problem with YAML:load Bino Oetomo wrote: > ----Start---- > if m.subject == "bntrans" > puts '---> Subject is BNTRANS, Proceed' > puts '--> Content of m.body' > puts m.body #puts the XMPP msg body > #Lets try struct for YAML > Nota = Struct.new(:nomor, :items) > Item = Struct.new(:description, :quantity, :satuan, :harga_satuan, > :total) > puts '----> try YAML::load again m.body' > Nota1 = YAML::load(IO.read(m.body)) > puts '-----nota----------' > end > ----Stop----- > OOppps ... my stupidity .. I have to not using YAML::load(IO.read(m.body)) m.body is a string variable .. so no need of IO.read I have to use YAML::load(m.body) Thank for all the enlightment sincerely -bino- -- Posted via http://www.ruby-forum.com/.