Eric Hodel wrote:
> I wrote an article on using RubyInline for optimization where I take
> png.rb, sprinkle in a little profiling and a little C and make it go
> over 100 times faster.
> 
> http://segment7.net/projects/ruby/inline_optimization.html
> 

Hi, I installed the gems but I immediately run into this:

C:\Inline\png-1.0.0>ruby -Ilib example/profile.rb
example/profile.rb:8:in `draw': undefined method `to_blob' for 
#<PNG:0x28c7b28>
(NoMethodError)
        from example/profile.rb:15
        from example/profile.rb:15

... on Windows.

I get the same thing in cygwin:

$ time ruby -Ilib example/profile.rb
example/profile.rb:8:in `draw': undefined method `to_blob' for 
#<PNG:0x28c7b28>
(NoMethodError)
        from example/profile.rb:15
        from example/profile.rb:15
real    0m2.361s
user    0m0.015s
sys     0m0.046s

The rdoc does not show a a 'to_blob' method for PNG

Any idea?

-- Mike Berrow



-- 
Posted via http://www.ruby-forum.com/.