From: Ja Tse Date: 2012-08-11T04:22:42+09:00 Subject: Unable to print a block argument. I am doing some experiment with ruby and I am not sure why the #len method is not returning the length of the object that I created from Foo. class Foo def self.open(test) x = new test block_given? ? yield(test) : test end attr_accessor :op def initialize( op ) @op = op end def len @op.length end end Foo.open("this") { |o| puts o.len } -- Posted via http://www.ruby-forum.com/.