From 83c22ac59228fd35de1f4b7d1a8820e31f7acc4c Mon Sep 17 00:00:00 2001 From: "igor%mir2.org" Date: Fri, 15 Oct 2004 20:41:01 +0000 Subject: [PATCH] For compatibility wrap numbers always as Double instances. --- js/rhino/src/org/mozilla/javascript/ScriptRuntime.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/js/rhino/src/org/mozilla/javascript/ScriptRuntime.java b/js/rhino/src/org/mozilla/javascript/ScriptRuntime.java index dd381fe674ec..926790b6a147 100644 --- a/js/rhino/src/org/mozilla/javascript/ScriptRuntime.java +++ b/js/rhino/src/org/mozilla/javascript/ScriptRuntime.java @@ -223,16 +223,6 @@ public class ScriptRuntime { public static Number wrapNumber(double x) { - int i = (int)x; - if ((double)i == x) { - if (i == 0) { - if (1.0 / x < 0) { - // x is -0.0 - return new Double(x); - } - } - return wrapInt(i); - } if (x != x) { return ScriptRuntime.NaNobj; }