tapioca
tapioca copied to clipboard
Fix invalid byte sequence error
Motivation
When we try to run tapioca dsl inside an ubuntu docker container, we get the following error:
/gems/ruby/3.3.0/gems/tapioca-0.17.5/lib/tapioca/rbs/rewriter.rb:49:in `=~': invalid byte sequence in US-ASCII (ArgumentError)
When I debugged which path it was having a problem with it was /gems/ruby/3.3.0/gems/tapioca-0.17.5/lib/tapioca/cli.rb.
Implementation
I specified the encoding when reading the file.
Tests
I didn't add tests as I believe I'd have to spin up a new environment to test this.