hpricot:Hpricot::Elements:Getting More Detailed
マニュアルだと、
doc.search("h3").each do |h3| while ele = h3.next_sibling ary << ele # stuff away all the elements under the h3 end end
となっているが、これはうまく動くのか?
ary = [] doc.search("h3").each do |h3| ele = h3 while ele = ele.next_sibling ary << ele end end
の間違いかとも思ったが、それでも変っぽい