Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdlib/source_map/vlq is broken #1075

Closed
zetachang opened this issue Aug 25, 2015 · 2 comments
Closed

stdlib/source_map/vlq is broken #1075

zetachang opened this issue Aug 25, 2015 · 2 comments

Comments

@zetachang
Copy link

require "source_map/vlq"
puts SourceMap::VLQ.encode([0])

It should output "A", but instead we got empty string.

After investigation, the problem is due to begin; end while block around https://github.com/opal/opal/blob/master/stdlib/source_map/vlq.rb#L31-L36.

According to #575, Opal implemented differently compared to MRI.

A solution may be using a loop do; break; end to replace it.

Some context: I am working on https://github.com/zetachang/opalrb-loader, thus source map support will be utilized.

@elia
Copy link
Member

elia commented Aug 25, 2015

Apparently I fixed this upstream but forgot to apply in our copy

maccman/sourcemap#10

wied03 added a commit to wied03/opal that referenced this issue Apr 9, 2016
The exception started slipping through the rescue in compiler.rb

Ultimately that needs to be fixed (along with validating whether
SyntaxError or RuntimeError should be what's raised). For now, make the
compiler specs runnable in Opal and filter what does not currently
pass (regex, __FILE__ issues)

Add matchers to fill in for RSpec, stub out RSpec helper, fix not_to
bridge

Apply change/test from opal#1075
wied03 added a commit to wied03/opal that referenced this issue Apr 9, 2016
The exception started slipping through the rescue in compiler.rb

Ultimately that needs to be fixed (along with validating whether
SyntaxError or RuntimeError should be what's raised). For now, make the
compiler specs runnable in Opal and filter what does not currently
pass (regex, __FILE__ issues)

Add matchers to fill in for RSpec, stub out RSpec helper, fix not_to
bridge

Apply change/test from opal#1075
@elia
Copy link
Member

elia commented Apr 11, 2016

fixed by #1426

@elia elia closed this as completed Apr 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants