diff --git a/core/src/main/java/org/jruby/RubyString.java b/core/src/main/java/org/jruby/RubyString.java index 154d2360766..02a954b31b8 100644 --- a/core/src/main/java/org/jruby/RubyString.java +++ b/core/src/main/java/org/jruby/RubyString.java @@ -1348,7 +1348,7 @@ public boolean equals(Object other) { @SuppressWarnings("NonOverridingEquals") final boolean equals(RubyString other) { - return ((RubyString) other).value.equal(value); + return other.value.equal(value); } /** rb_obj_as_string