Skip to content

Commit 038a0d9

Browse files
committed
⬆️ Update Opal to v1.7.1
1 parent b3269fd commit 038a0d9

File tree

4 files changed

+18
-16
lines changed

4 files changed

+18
-16
lines changed

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
eval_gemfile File.join(__dir__, 'BCDice/Gemfile')
22

3-
gem 'opal', ">= 1.4.1"
3+
gem 'opal', ">= 1.7.1"

Gemfile.lock

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ GEM
1414
docile (1.4.0)
1515
i18n (1.8.11)
1616
concurrent-ruby (~> 1.0)
17-
opal (1.4.1)
17+
opal (1.7.1)
1818
ast (>= 2.3.0)
1919
parser (~> 3.0, >= 3.0.3.2)
20-
parallel (1.21.0)
21-
parser (3.1.1.0)
20+
parallel (1.22.1)
21+
parser (3.1.3.0)
2222
ast (~> 2.4.1)
2323
power_assert (2.0.1)
2424
racc (1.5.2)
2525
rainbow (3.1.1)
2626
rake (13.0.6)
27-
regexp_parser (2.2.1)
27+
regexp_parser (2.6.1)
2828
rexml (3.2.5)
2929
rubocop (1.7.0)
3030
parallel (~> 1.10)
@@ -35,7 +35,7 @@ GEM
3535
rubocop-ast (>= 1.2.0, < 2.0)
3636
ruby-progressbar (~> 1.7)
3737
unicode-display_width (>= 1.4.0, < 2.0)
38-
rubocop-ast (1.16.0)
38+
rubocop-ast (1.24.0)
3939
parser (>= 3.1.1.0)
4040
ruby-progressbar (1.11.0)
4141
simplecov (0.21.2)
@@ -59,7 +59,7 @@ PLATFORMS
5959
DEPENDENCIES
6060
bcdice!
6161
codecov (~> 0.4.2)
62-
opal (>= 1.4.1)
62+
opal (>= 1.7.1)
6363
racc (~> 1.5.1)
6464
rake (~> 13.0.3)
6565
rubocop (~> 1.7.0)

patch.diff

+11-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,17 @@ diff --git a/lib/bcdice/arithmetic/node.rb b/lib/bcdice/arithmetic/node.rb
4545
diff --git a/lib/bcdice/base.rb b/lib/bcdice/base.rb
4646
--- a/lib/bcdice/base.rb
4747
+++ b/lib/bcdice/base.rb
48-
@@ -328,7 +328,7 @@ module BCDice
48+
@@ -20,8 +20,7 @@ module BCDice
49+
# 応答するコマンドのprefixを登録する
50+
# @param prefixes [Array<String>]
51+
def register_prefix(*prefixes)
52+
- @prefixes ||= []
53+
- @prefixes.concat(prefixes.flatten)
54+
+ @prefixes = (@prefixes || []) + prefixes.flatten
55+
end
56+
57+
def register_prefix_from_super_class
58+
@@ -328,7 +327,7 @@ module BCDice
4959
num = @randomizer.roll_sum(count, 6)
5060
debug("num", num)
5161

ruby/patch.rb

-8
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,6 @@ def []
1111
end
1212
end
1313

14-
# Stub
15-
module ObjectFreezeStub
16-
def freeze
17-
self
18-
end
19-
end
20-
Object.prepend ObjectFreezeStub
21-
2214
# Opal Fix
2315
module StringScannerPatch
2416
# rubocop:disable Lint/UnusedMethodArgument

0 commit comments

Comments
 (0)