sorbet-runtime 0.5.9204 → 0.5.9219

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: 3816decf2cda63ae2397c11518a03442eec1f278f2084f99bb4defdc98b2e300
4
- data.tar.gz: e422cf4e35e0b4ed2aba961ad390df64b58720b2089f153cad90ed31cb60eb26
3
+ metadata.gz: b124e57cb0d345be63baf4069fa85790584517ec61cf4dca18a2f629e4e9e52f
4
+ data.tar.gz: 6c7f57071ceb46107aae1ae75a6d07387f6ede71f42cd954e4709b5f3ea5e859
5
5
  SHA512:
6
- metadata.gz: d400482fe99e058b94f4e4ddb02926090969199d9a915629f26163ba5d998c36cf86e588de93073c3f3b989b967616f7a47d6d1ff17d2258a7d98031f43da731
7
- data.tar.gz: 751d4901723758a81c2f9fe9dd206b025c7031c06be387f32909da59f33bd45fc4005d9258dcc3a774120f49b4fabe7ddfa1df639a749ff5e6476145c9c0a749
6
+ metadata.gz: a8fd1f048a3361c25808228a65a64c33d12931f38e18d771ca098c284c186d991c0918e74c90ba35ba17429fadd72b9f2e8a9c1f37abb8ef30c1331983fc728a
7
+ data.tar.gz: 9415e104416725f1d64a945ffd8914e1d1c93321c8de84956083e1b665d5e8269f8a9550897d5f5dd169db27e4911336f4391ede8997af605e525c6cf06bcdf7
data/lib/types/helpers.rb CHANGED
@@ -54,5 +54,5 @@ module T::Helpers
54
54
  # end
55
55
  #
56
56
  # TODO: implement the checks in sorbet-runtime.
57
- def requires_ancestor(&block); end
57
+ def requires_ancestor(*mods, &block); end
58
58
  end
@@ -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.9204
4
+ version: 0.5.9219
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-06 00:00:00.000000000 Z
11
+ date: 2021-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest