Skip to content

Commit

Permalink
[BUGFIX] Fixes #818
Browse files Browse the repository at this point in the history
  • Loading branch information
benlangfeld committed Jan 5, 2013
1 parent 15ca975 commit 79f9875
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/java/nokogiri/XmlNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,9 @@ public IRubyObject get(ThreadContext context, IRubyObject rbkey) {
if (rbkey == null || rbkey.isNil()) context.getRuntime().getNil();
String key = rubyStringToString(rbkey);
Element element = (Element) node;
if (!element.hasAttribute(key)) return context.getRuntime().getNil();
String value = element.getAttribute(key);
return nonEmptyStringOrNil(context.getRuntime(), value);
return stringOrNil(context.getRuntime(), value);
}
return context.getRuntime().getNil();
}
Expand Down

0 comments on commit 79f9875

Please sign in to comment.