Skip to content

Commit

Permalink
unbox characters into strings #329
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Mar 13, 2024
1 parent c21bf3b commit 6599533
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 24 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* make `null` falsy value [#330](https://github.com/jcubic/lips/issues/330)
* remove `nil` parser constant [#332](https://github.com/jcubic/lips/issues/332)
* replace `undefined` with `#void`, and `null` with `#null`
* characters are again unboxed into strings by JavaScript code [#329](https://github.com/jcubic/lips/issues/329)
### Features
* add `vector-for-each` and `vector-copy!` function from R7RS
* add `string-for-each`, `string-downcase`, and `string-upcase` from R7RS
Expand Down
11 changes: 5 additions & 6 deletions dist/lips.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions dist/lips.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/lips.esm.min.js

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions dist/lips.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/lips.min.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/lips.js
Original file line number Diff line number Diff line change
Expand Up @@ -4607,8 +4607,7 @@ function map_object(object, fn) {
}
// ----------------------------------------------------------------------
function unbox(object) {
// LCharacter is unboxable #233
var lips_type = [LString, LNumber].some(x => object instanceof x);
var lips_type = [LString, LNumber, LCharacter].some(x => object instanceof x);
if (lips_type) {
return object.valueOf();
}
Expand Down

0 comments on commit 6599533

Please sign in to comment.