ExecJS.eval does not tolerate trailing semicolon
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, ruby
- 领域
- backend
调研方向
Start at the ExecJS.eval entry point and trace the MiniRacerRuntime path for input ending in a semicolon. Confirm the behavior with the example '1+2;' and add regression coverage showing that it evaluates successfully as 3 rather than raising the reported SyntaxError.
由索引模型根据 Issue 内容生成。
描述
irb(main):009:0> ExecJS.runtime
=> #<ExecJS::MiniRacerRuntime:0x007feb4abf7178>
irb(main):010:0> ExecJS.eval '1+2'
=> 3
irb(main):011:0> ExecJS.eval '1+2;'
ExecJS::RuntimeError: Uncaught SyntaxError: Unexpected token ; at undefined:1:4
I think ExecJS.eval should tolerate trailing semicolons. I had this happen in a library stack where a library js file ended with a semicolon and the stack was feeding it to eval.
- 主要语言
- Ruby
- 星标
- 578
- 派生
- 286
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rails/execjs 的其他 Issue
-
Runtime stderr is missing from ruby error message可能已有人在做 @arpitjain099 于 122 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 45/100
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 25/100
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
slovensko-digital/autogram-portal#392 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
voxpupuli/puppet-quadlets#122 · 5 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
TheOdinProject/curriculum#31452 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100