From: Chih-Chao Lam Date: 2006-08-26T03:33:15+09:00 Subject: Hpricot Help Hi, I'm playing around with Hpricot was am wondering if I'm using it wrongly or have I encountered a bug. Here's an irb transcript that shows this: irb(main):001:0> html = "
abc
" => "
abc
" irb(main):002:0> require 'rubygems'; require 'hpricot' => true irb(main):003:0> @doc = Hpricot(html) => # {text "abc"} }> irb(main):004:0> @doc.search('.xyz') NoMethodError: undefined method `[]=' for # from /usr/local/ror/lib/ruby/gems/1.8/gems/hpricot-0.4/lib/ hpricot/traverse.rb:110:in `search' from (irb):4 I'm trying to get all html elements of the class "xyz" (regardless of HTML Element tag type). Looking at line#110 or traverse.rb, it looks like the code is trying to make an assignment to a MatchData pseudo-array. Is this allowed? Thanks for any help here and thanks to _why for a fantastic library, Chao Lam