I''ve found a conflict between assert2 and ActiveSupport. Both define the method in_groups_of() with different signatures and semantics. It shows up in Ultrasphinx when I run my tests. I''ve reproduced it in the console, see below. Any suggests on how to force the desired in_groups_of() method? TIA, Jeffrey> script/consoleLoading development environment (Rails 2.1.2)>> a = [1, 2, 3, 4]=> [1, 2, 3, 4]>> a.in_groups_of(2)=> [[1, 2], [3, 4]]>> require ''assert2''=> ["Assert_2_0"]>> a.in_groups_of(2)LocalJumpError: no block given from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `each_slice'' from /usr/lib/ruby/gems/1.8/gems/assert2-0.3.1/lib/ruby_reflector.rb:829:in `each'' from /usr/lib/ruby/gems/1.8/gems/assert2-0.3.1/lib/ruby_reflector.rb:829:in `each_slice'' from /usr/lib/ruby/gems/1.8/gems/assert2-0.3.1/lib/ruby_reflector.rb:829:in `in_groups_of'' from (irb):4>> quit--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''ve found a conflict between assert2 and ActiveSupport. Both define the method in_groups_of() with different signatures and semantics. It shows up in Ultrasphinx when I run my tests. I''ve reproduced it in the console, see below. Any suggests on how to force the desired in_groups_of() method? TIA, Jeffrey> script/consoleLoading development environment (Rails 2.1.2)>> a = [1, 2, 3, 4]=> [1, 2, 3, 4]>> a.in_groups_of(2)=> [[1, 2], [3, 4]]>> require ''assert2''=> ["Assert_2_0"]>> a.in_groups_of(2)LocalJumpError: no block given from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `each_slice'' from /usr/lib/ruby/gems/1.8/gems/assert2-0.3.1/lib/ruby_reflector.rb:829:in `each'' from /usr/lib/ruby/gems/1.8/gems/assert2-0.3.1/lib/ruby_reflector.rb:829:in `each_slice'' from /usr/lib/ruby/gems/1.8/gems/assert2-0.3.1/lib/ruby_reflector.rb:829:in `in_groups_of'' from (irb):4>> quit--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I find it hard to beleive that I am the only one using both UltraSphinx and
assert{2.0}. To make the question more general, how do I in Ruby disambiguate
method calls? I.e., given two methods with identical names, say meth, in
different
namespace, e.g., NS1 and NS2 how do a force a call to one of them? Using the
example below, I''d like to call
a.NS1::in_groups_of(2) or maybe a.NS1.in_groups_of(2)
TIA,
Jeffrey
Quoting Jeffrey L. Taylor
<ror-f/t7CGFWhwGcvWdFBKKxig@public.gmane.org>:>
> I''ve found a conflict between assert2 and ActiveSupport. Both
define the
> method in_groups_of() with different signatures and semantics. It shows up
in
> Ultrasphinx when I run my tests. I''ve reproduced it in the
console, see
> below. Any suggests on how to force the desired in_groups_of() method?
>
> TIA,
> Jeffrey
>
> > script/console
> Loading development environment (Rails 2.1.2)
> >> a = [1, 2, 3, 4]
> => [1, 2, 3, 4]
> >> a.in_groups_of(2)
> => [[1, 2], [3, 4]]
> >> require ''assert2''
> => ["Assert_2_0"]
> >> a.in_groups_of(2)
> LocalJumpError: no block given
> from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`each_slice''
> from
/usr/lib/ruby/gems/1.8/gems/assert2-0.3.1/lib/ruby_reflector.rb:829:in
`each''
> from
/usr/lib/ruby/gems/1.8/gems/assert2-0.3.1/lib/ruby_reflector.rb:829:in
`each_slice''
> from
/usr/lib/ruby/gems/1.8/gems/assert2-0.3.1/lib/ruby_reflector.rb:829:in
`in_groups_of''
> from (irb):4
> >> quit
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Quoting Jeffrey L. Taylor <ror-f/t7CGFWhwGcvWdFBKKxig@public.gmane.org>:> > I''ve found a conflict between assert2 and ActiveSupport. Both define the > method in_groups_of() with different signatures and semantics. It shows up in > Ultrasphinx when I run my tests. I''ve reproduced it in the console, see > below. Any suggests on how to force the desired in_groups_of() method? > > TIA, > Jeffrey > > > script/console > Loading development environment (Rails 2.1.2) > >> a = [1, 2, 3, 4] > => [1, 2, 3, 4] > >> a.in_groups_of(2) > => [[1, 2], [3, 4]] > >> require ''assert2'' > => ["Assert_2_0"] > >> a.in_groups_of(2) > LocalJumpError: no block given > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `each_slice'' > from /usr/lib/ruby/gems/1.8/gems/assert2-0.3.1/lib/ruby_reflector.rb:829:in `each'' > from /usr/lib/ruby/gems/1.8/gems/assert2-0.3.1/lib/ruby_reflector.rb:829:in `each_slice'' > from /usr/lib/ruby/gems/1.8/gems/assert2-0.3.1/lib/ruby_reflector.rb:829:in `in_groups_of'' > from (irb):4 > >> quitMy solution is to delete the in_groups_of method in the assert{2.0}. It appears to be just a special case of the code in ActiveSupport. Jeffrey --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---