Skip to content

Commit

Permalink
rewrite (RubyArray) nodes.size retrieval - return type is an int actu…
Browse files Browse the repository at this point in the history
…ally
  • Loading branch information
kares committed Feb 12, 2017
1 parent af2873d commit 099a950
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/java/nokogiri/XmlNodeSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ final void initialize(Ruby runtime, IRubyObject refNode) {
}
}

public long length() {
if (nodes == null) return 0L;
return nodes.length().getLongValue();
public int length() {
if (nodes == null) return 0;
return nodes.size();
}

public void relink_namespace(ThreadContext context) {
Expand Down

0 comments on commit 099a950

Please sign in to comment.