Testcase
var a = '123'.substr(1, undefined);
print(a);
Expect Output
'23'
Rhino Actual Output
''
Other JS Engines Output
'23'
Rhino Version
1.7.12 & 1.7.11
ECMA Script Standard
In ES Standard( 5.1/6/10), it says:
The substr method takes two arguments, start and length, and returns a substring of the result of converting the this object to a String, starting from character position start and running for length characters (or through the end of the String if length is undefined).
I think this is a implementation bug of rhino.
Looking forward to your reply, thanks! 😆