Re: [rspec-users] question about throw_symbol

2009-08-18 Thread Tom Stuart
On 18 Aug 2009, at 20:16, Paul Mylchreest wrote: So, taking from your book, on page 212: [...] I guess that is a typo, correct? As an aside, I don't understand this section of the book ("Expecting a Throw") at all. The original version of the loop already "short circuits" (with return) wi

Re: [rspec-users] question about throw_symbol

2009-08-18 Thread Paul Mylchreest
Thanks David, So, taking from your book, on page 212: =begin def working_too_hard? catch :working_too_hard do weeks.each do |week| people.each do |person| throw :working_too_hard, true if person.hours_for(week) > 50 end end end end To set an e

Re: [rspec-users] question about throw_symbol

2009-08-18 Thread David Chelimsky
On Tue, Aug 18, 2009 at 12:19 PM, Paul Mylchreest wrote: > Given >  rspec 1.2.8 >  ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0] > > And the following spec: > >  def over_limit?(a) >    catch(:over_limit) do >      a.each do |x| >        throw(:over_limit) if x > 10 >      end >    e

[rspec-users] question about throw_symbol

2009-08-18 Thread Paul Mylchreest
Given rspec 1.2.8 ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0] And the following spec: def over_limit?(a) catch(:over_limit) do a.each do |x| throw(:over_limit) if x > 10 end end end describe "when over limit" do it "should throw symbol

Re: [rspec-users] "undefined method `gem' for main:Object" when installing rspec from the sources

2009-08-18 Thread David Chelimsky
2009/8/18 Maciej Bliziński : > On Tue, Aug 18, 2009 at 4:20 PM, David Chelimsky wrote: >> That is a very old version of rubygems (2007-02-05) which probably >> doesn't support the gem method yet (just guessing). I'm using 1.3.4 >> (though it looks like there is a 1.3.5 version I missed). I'd >> rec

Re: [rspec-users] "undefined method `gem' for main:Object" when installing rspec from the sources

2009-08-18 Thread Maciej Bliziński
On Tue, Aug 18, 2009 at 4:20 PM, David Chelimsky wrote: > That is a very old version of rubygems (2007-02-05) which probably > doesn't support the gem method yet (just guessing). I'm using 1.3.4 > (though it looks like there is a 1.3.5 version I missed). I'd > recommend upgrading. I've upgraded ru

Re: [rspec-users] rake and cucumber fails with ruby-1.9.1-p243 and polyglot 0.2.7

2009-08-18 Thread oren
I guess it was fixed in 0.2.8 - http://groups.google.com/group/cukes/browse_thread/thread/4497bae018d49e4f/88afe4037eb338e2?lnk=gst&q=polyglot#88afe4037eb338e2 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rs

Re: [rspec-users] rake and cucumber fails with ruby-1.9.1-p243 and polyglot 0.2.7

2009-08-18 Thread David Chelimsky
On Tue, Aug 18, 2009 at 10:47 AM, oren wrote: > rake and cucumber fails with  ruby-1.9.1-p243 and polyglot 0.2.7. > (btw, when commenting the require method (polyglot.rb:56) it's > passing) > > rake spec > > /opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/polyglot-0.2.7/lib/ > polyglot.rb:44:in `load

[rspec-users] rake and cucumber fails with ruby-1.9.1-p243 and polyglot 0.2.7

2009-08-18 Thread oren
rake and cucumber fails with ruby-1.9.1-p243 and polyglot 0.2.7. (btw, when commenting the require method (polyglot.rb:56) it's passing) rake spec /opt/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/polyglot-0.2.7/lib/ polyglot.rb:44:in `load': Failed to load /home/oren/misc/borderstylo/ code/silica1.

Re: [rspec-users] "undefined method `gem' for main:Object" when installing rspec from the sources

2009-08-18 Thread David Chelimsky
2009/8/18 Maciej Bliziński : > On Tue, Aug 18, 2009 at 4:06 PM, David Chelimsky wrote: >>> More information: >>> >>> $ rake --version >>> rake, version 0.8.7 >> >> What Ruby and Rubygems versions:? >> >> $ ruby --version >> $ gem --version > > $ ruby --version > ruby 1.8.7 (2009-06-12 patchlevel 17

Re: [rspec-users] "undefined method `gem' for main:Object" when installing rspec from the sources

2009-08-18 Thread Maciej Bliziński
On Tue, Aug 18, 2009 at 4:06 PM, David Chelimsky wrote: >> More information: >> >> $ rake --version >> rake, version 0.8.7 > > What Ruby and Rubygems versions:? > > $ ruby --version > $ gem --version $ ruby --version ruby 1.8.7 (2009-06-12 patchlevel 174) [i386-solaris2.8] $ gem --version 0.9.2 __

Re: [rspec-users] "undefined method `gem' for main:Object" when installing rspec from the sources

2009-08-18 Thread David Chelimsky
2009/8/18 Maciej Bliziński : > Hello rspec, > > I'm working on a Solaris rspec package (for OpenCSW). I pulled the > current git sources as described at http://wiki.github.com/dchelimsky/rspec > in the "Build and install the rspec gem from source" section. After > 'rake gem' I'm getting: > > /expor

[rspec-users] "undefined method `gem' for main:Object" when installing rspec from the sources

2009-08-18 Thread Maciej Bliziński
Hello rspec, I'm working on a Solaris rspec package (for OpenCSW). I pulled the current git sources as described at http://wiki.github.com/dchelimsky/rspec in the "Build and install the rspec gem from source" section. After 'rake gem' I'm getting: /export/home/maciej/src/rspec/Rakefile:92: warnin