Permalink
Browse files

Some fixes for ruby 1.8.7

  • Loading branch information...
1 parent 5e8c0db commit 994ca9770b175c70e0d5ee5a05828b17d0afb893 @skade skade committed Apr 14, 2012
Showing with 7 additions and 1 deletion.
  1. +5 −0 Gemfile.lock
  2. +2 −1 eson-dsl/lib/eson/modules/query_plugin.rb
View
@@ -34,19 +34,24 @@ GEM
i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.2.7)
+ bouncy-castle-java (1.5.0146.1)
elasticsearch-node (0.7.0)
faraday (0.7.6)
addressable (~> 2.2)
multipart-post (~> 1.1)
rack (~> 1.1)
i18n (0.6.0)
+ jruby-openssl (0.7.6.1)
+ bouncy-castle-java (>= 1.5.0146.1)
+ json (1.6.6-java)
multi_json (1.2.0)
multipart-post (1.1.5)
rack (1.4.1)
rake (0.9.2.2)
rr (1.0.4)
PLATFORMS
+ java
ruby
DEPENDENCIES
@@ -33,7 +33,8 @@ def self.plugin_for(protocol)
end
def handle_block(&block)
- if block.arity == 0
+ # in ruby 1.8.7, `lambda {}.arity == -1`
+ if (block.arity == 0) || (block.arity == -1)
query(&block)
else
super

0 comments on commit 994ca97

Please sign in to comment.