Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

specialy handle jruby and json

  • Loading branch information...
commit 0ac91f962233d4fce4b9c875ca9a6b4dcc02a092 1 parent 8ee9a4d
Sam Pullara authored
8 compiler/src/main/java/com/github/mustachejava/jruby/JRubyObjectHandler.java
View
@@ -50,6 +50,14 @@ public boolean apply(@Nullable Object[] input) {
}
});
return createWrapper(scopeIndex, wrappers, guards, MAP_METHOD, new Object[]{rs});
+ } else {
+ guards.add(new Predicate<Object[]>() {
+ @Override
+ public boolean apply(@Nullable Object[] input) {
+ assert input != null;
+ return !((RubyHash)input[scopeIndex]).containsKey(rs);
+ }
+ });
}
}
if (scope instanceof RubyObject) {
2  handlebar/src/main/java/com/sampullara/mustache/Handlebar.java
View
@@ -64,6 +64,8 @@ public static Object toObject(final JsonNode node) {
put(next.getKey(), o);
}
}};
+ } else if (node.isBoolean()) {
+ return node.getBooleanValue();
} else if (node.isNull()) {
return null;
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.