Permalink
Browse files

Fix for Jruby 1.8 mode, closes #20

  • Loading branch information...
1 parent cdb53b9 commit dfc600931bff3bb34acb32d3486d33734796b9f6 @andreasronge andreasronge committed Dec 28, 2012
View
3 CHANGELOG
@@ -1,3 +1,6 @@
+
+* fix for JRuby 1.8 mode, #20
+
== 2.2.2 / 2012-12-27
* Use Neo4j 1.8.1 and avoid JRuby Warnings #19
View
4 Gemfile
@@ -2,8 +2,8 @@ source :gemcutter
gemspec
-gem 'neo4j-advanced', '>= 1.9.M03', '< 2.0', :require => false
-gem 'neo4j-enterprise', '>= 1.9.M03', '< 2.0', :require => false
+gem 'neo4j-advanced', '>= 1.8.1', '< 2.0', :require => false
+gem 'neo4j-enterprise', '>= 1.8.1', '< 2.0', :require => false
group 'development' do
gem 'pry'
View
2 lib/neo4j-core/traversal/evaluator.rb
@@ -15,7 +15,7 @@ def initialize(&eval_block)
# evaluate(Path path, BranchState<STATE> state)
# Evaluates a Path and returns an Evaluation containing information about whether or not to include it in the traversal result, i.e return it from the Traverser.
def evaluate(path, state)
- ret = @eval_block.call(path, state)
+ ret = @eval_block.call(path)
case ret
when :exclude_and_continue then
Java::OrgNeo4jGraphdbTraversal::Evaluation::EXCLUDE_AND_CONTINUE
View
2 lib/neo4j-core/traversal/filter_predicate.rb
@@ -21,7 +21,7 @@ def evaluate(path, state)
end
# find the first filter which returns false
# if not found then we will accept this path
- if @procs.find { |p| !p.call(path, state) }.nil?
+ if @procs.find { |p| !p.call(path) }.nil?
Java::OrgNeo4jGraphdbTraversal::Evaluation::INCLUDE_AND_CONTINUE
else
Java::OrgNeo4jGraphdbTraversal::Evaluation::EXCLUDE_AND_CONTINUE
View
2 lib/neo4j-core/traversal/prune_evaluator.rb
@@ -14,7 +14,7 @@ def initialize(proc)
# for the state parameter see - http://api.neo4j.org/1.8.1/org/neo4j/graphdb/traversal/BranchState.html
def evaluate(path, state)
return Java::OrgNeo4jGraphdbTraversal::Evaluation::EXCLUDE_AND_CONTINUE if path.length == 0
- if @proc.call(path, state)
+ if @proc.call(path)
Java::OrgNeo4jGraphdbTraversal::Evaluation::INCLUDE_AND_PRUNE
else
Java::OrgNeo4jGraphdbTraversal::Evaluation::INCLUDE_AND_CONTINUE
View
2 neo4j-core.gemspec
@@ -27,6 +27,6 @@ It comes included with the Apache Lucene document database.
s.extra_rdoc_files = %w( README.rdoc )
s.rdoc_options = ["--quiet", "--title", "Neo4j::Core", "--line-numbers", "--main", "README.rdoc", "--inline-source"]
- s.add_dependency("neo4j-community", '>= 1.9.M03', '< 1.9')
+ s.add_dependency("neo4j-community", '>= 1.8.1', '< 1.9')
s.add_dependency("neo4j-cypher", '~> 1.0.0')
end

0 comments on commit dfc6009

Please sign in to comment.