sorbet-runtime 0.5.9209 → 0.5.9222

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd949ced8b199c628d5717a608f5a0f639031ccabf6e046525d834b182be2596
4
- data.tar.gz: b382d69a6c6a0775cad3eb946dbafb6e1c4c982279dc42d7e55c6175c78c2e51
3
+ metadata.gz: 80d86feff2d97f3117a87bbbae84bf02d3ae12920f0c32a5d467f2c3d6553704
4
+ data.tar.gz: 78ce63cc220673005ccdb2dd3c2343dbf06f1a870a2d7c90b0980ee131566dba
5
5
  SHA512:
6
- metadata.gz: 9b7435985ff3d8cd0d5f30a3902e8f3ec13aab82728f7c28f981f5a20437337d48a7b97ff7072ad1bd9c4ed8479bb286ffe5f61a0f6c613db6f9cfdaea6833b8
7
- data.tar.gz: 9d89f9b1de037316b89994f16151340ca299cff0522905913110d9dd941a25d8f8c2fe69a7d2bd48755e7eafafe0a7e0f3b20f0f14eb9737c44dcedfc364c571
6
+ metadata.gz: d94e4823882911b50e6ef57c55228a85a1e13ad1579b80b009338349b13aad7765ad2d6a3a568d95579aebf9973b6decdcff053c179f963d26b6c83c77c5c9ec
7
+ data.tar.gz: 823a78ef822be64c9793bd5a71fd98ce59c498e03543781dc0e7e37ac24ede2820528d1135797608b97e6fa28df883459bd936420b9f374ed5359e88ee61f55d
@@ -40,6 +40,11 @@ module T::Private::Abstract::Declare
40
40
  end
41
41
  super(*args, &blk)
42
42
  end
43
+
44
+ # Ruby doesn not emit "method redefined" warnings for aliased methods
45
+ # (more robust than undef_method that would create a small window in which the method doesn't exist)
46
+ mod.send(:alias_method, :initialize, :initialize)
47
+
43
48
  if mod.respond_to?(:ruby2_keywords, true)
44
49
  mod.send(:ruby2_keywords, :initialize)
45
50
  end
@@ -83,6 +83,11 @@ module T::Props
83
83
  lazily_defined_methods[name] = blk
84
84
 
85
85
  cls = decorated_class
86
+ if cls.method_defined?(name)
87
+ # Ruby doesn not emit "method redefined" warnings for aliased methods
88
+ # (more robust than undef_method that would create a small window in which the method doesn't exist)
89
+ cls.send(:alias_method, name, name)
90
+ end
86
91
  cls.send(:define_method, name) do |*args|
87
92
  self.class.decorator.send(:eval_lazily_defined_method!, name)
88
93
  send(name, *args)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9209
4
+ version: 0.5.9222
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-07 00:00:00.000000000 Z
11
+ date: 2021-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest