Skip to content

Commit 81b72e3

Browse files
rake format
1 parent cbc1ad7 commit 81b72e3

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

packages/npm-packages/ruby-wasm-wasi/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ See [Cheat Sheet](https://github.com/ruby/ruby.wasm/blob/main/docs/cheat_sheet.m
88

99
## Ruby Version Support
1010

11-
| Version | Package |
12-
| ------- | -------------------------------------------------- |
11+
| Version | Package |
12+
| ------- | --------------------------------------------------------------------------------------------------------------- |
1313
| `head` | [`@ruby/head-wasm-wasi`](https://github.com/ruby/ruby.wasm/tree/main/packages/npm-packages/ruby-head-wasm-wasi) |
1414
| `3.3` | [`@ruby/3.3-wasm-wasi`](https://github.com/ruby/ruby.wasm/tree/main/packages/npm-packages/ruby-3.3-wasm-wasi) |
1515
| `3.2` | [`@ruby/3.2-wasm-wasi`](https://github.com/ruby/ruby.wasm/tree/main/packages/npm-packages/ruby-3.2-wasm-wasi) |

packages/npm-packages/ruby-wasm-wasi/src/index.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,9 @@ class RbExceptionFormatter {
545545
// but checking re-entrancy just in case.
546546
class RbExceptionFormatterError extends Error {}
547547
if (this.isFormmatting) {
548-
throw new RbExceptionFormatterError("Unexpected exception occurred during formatting exception message");
548+
throw new RbExceptionFormatterError(
549+
"Unexpected exception occurred during formatting exception message",
550+
);
549551
}
550552
this.isFormmatting = true;
551553
try {
@@ -555,7 +557,11 @@ class RbExceptionFormatter {
555557
}
556558
}
557559

558-
private _format(error: RbValue, vm: RubyVM, privateObject: RubyVMPrivate): string {
560+
private _format(
561+
error: RbValue,
562+
vm: RubyVM,
563+
privateObject: RubyVMPrivate,
564+
): string {
559565
const [zeroLiteral, oneLiteral, newLineLiteral] = (() => {
560566
if (this.literalsCache == null) {
561567
const zeroOneNewLine: [RbValue, RbValue, RbValue] = [

packages/npm-packages/ruby-wasm-wasi/test/unit/require_remote/url_resolver.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ def test_get_location_with_relative_path
1818
end
1919

2020
def test_get_location_with_relative_path_and_filename
21-
url_resolver = JS::RequireRemote::URLResolver.new("https://example.com/bar.rb")
21+
url_resolver =
22+
JS::RequireRemote::URLResolver.new("https://example.com/bar.rb")
2223
script_location = url_resolver.get_location("./foo.rb")
2324
assert_equal "https://example.com/foo.rb", script_location.url.to_s
2425
assert_equal "./foo.rb", script_location.filename
@@ -32,21 +33,24 @@ def test_get_location_with_relative_path_and_filename_without_extension
3233
end
3334

3435
def test_get_location_with_relative_path_and_directory
35-
url_resolver = JS::RequireRemote::URLResolver.new("https://example.com/bar/")
36+
url_resolver =
37+
JS::RequireRemote::URLResolver.new("https://example.com/bar/")
3638
script_location = url_resolver.get_location("./foo.rb")
3739
assert_equal "https://example.com/bar/foo.rb", script_location.url.to_s
3840
assert_equal "./foo.rb", script_location.filename
3941
end
4042

4143
def test_get_location_with_backward_relative_path
42-
url_resolver = JS::RequireRemote::URLResolver.new("https://example.com/bar/")
44+
url_resolver =
45+
JS::RequireRemote::URLResolver.new("https://example.com/bar/")
4346
script_location = url_resolver.get_location("../foo.rb")
4447
assert_equal "https://example.com/foo.rb", script_location.url.to_s
4548
assert_equal "../foo.rb", script_location.filename
4649
end
4750

4851
def test_get_location_with_backward_relative_path_and_filename
49-
url_resolver = JS::RequireRemote::URLResolver.new("https://example.com/baz.rb")
52+
url_resolver =
53+
JS::RequireRemote::URLResolver.new("https://example.com/baz.rb")
5054
script_location = url_resolver.get_location("../foo.rb")
5155
assert_equal "https://example.com/foo.rb", script_location.url.to_s
5256
assert_equal "../foo.rb", script_location.filename

packages/npm-packages/ruby-wasm-wasi/test/vm.test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,8 @@ eval:11:in \`<main>'`);
127127
end
128128
raise BrokenException.new
129129
`);
130-
}
131-
expect(throwError)
132-
.toThrowError(`BrokenException: unknown`);
130+
};
131+
expect(throwError).toThrowError(`BrokenException: unknown`);
133132
});
134133

135134
test("eval encoding", async () => {

0 commit comments

Comments
 (0)