Permalink
Browse files

fixes #2349: inclusive slicing to numeric strings

  • Loading branch information...
1 parent f938a21 commit b8149812cd8654c56ee67422db3e7bfd6d5f056b @michaelficarra michaelficarra committed May 20, 2012

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -787,7 +787,7 @@ exports.Slice = class Slice extends Base
"#{+compiled + 1}"
else
compiled = to.compile o, LEVEL_ACCESS
- "#{compiled} + 1 || 9e9"
+ "+#{compiled}+1 || 9e9"
@jashkenas

jashkenas May 21, 2012

Owner

Can we space this out properly?

+#{compiled} + 1

@michaelficarra

michaelficarra May 21, 2012

Collaborator

You must have missed 972a529.

@jashkenas

jashkenas May 21, 2012

Owner

Ah, thank you.

".slice(#{ fromStr }#{ toStr or '' })"
#### Obj
@@ -61,6 +61,9 @@ test "#1722: operator precedence in unbounded slice compilation", ->
arrayEq [0..n], list[..n or 0]
arrayEq [0..n], list[..if n then n else 0]
+test "#2349: slicing to numeric strings", ->
+ arrayEq [0, 1], [0..10][.."1"]
+
# Splicing

0 comments on commit b814981

Please sign in to comment.