From 599a2af7ebba1510270ba4835594179deadf82a1 Mon Sep 17 00:00:00 2001 From: Yoko Harada Date: Sun, 1 Apr 2012 16:25:16 -0400 Subject: [PATCH] Fix for issue#648. Adds Nil check to NokogiriHelpers.rubyStringToString(IRubyObject) --- ext/java/nokogiri/internals/NokogiriHelpers.java | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/java/nokogiri/internals/NokogiriHelpers.java b/ext/java/nokogiri/internals/NokogiriHelpers.java index a731c2a5080..d7793fe2016 100644 --- a/ext/java/nokogiri/internals/NokogiriHelpers.java +++ b/ext/java/nokogiri/internals/NokogiriHelpers.java @@ -255,6 +255,7 @@ private static Charset getCharsetUTF8() { * this for us. */ public static String rubyStringToString(IRubyObject str) { + if (str.isNil()) return null; //return rubyStringToString(str.convertToString()); return toJavaString(str.convertToString()); }