From: Raj Singh Date: 2008-05-22T03:37:32+09:00 Subject: to_yaml method for array This is irb. > irb irb(main):001:0> a = %w[ 1 2 3 ] => ["1", "2", "3"] irb(main):002:0> a.to_yaml NoMethodError: undefined method `to_yaml' for ["1", "2", "3"]:Array from (irb):2 This is Rails script/console >> a = %w[ 1 2 3] => ["1", "2", "3"] >> a.to_yaml => "--- \n- \"1\"\n- \"2\"\n- \"3\"\n" However no where in ActiveSupport I can find where Rails is implementing the method to_yaml. I go to http://www.ruby-doc.org/core/ and look for Array methods. I see to_yaml. So why in the irb I am getting undefined method to_yaml? -- Posted via http://www.ruby-forum.com/.