tapioca 0.4.12 → 0.4.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa0397f8a108fad9551d726b06c39f1aa7f8e03c86d43a7ef50c25ad4cf8d10b
4
- data.tar.gz: d3207d13a06219a661f7fbaa5a55300d19512815c03c3db9bb653730a86ca448
3
+ metadata.gz: ce4d47f5c9b44a027ecd554533420b2a567ba3353cc073b85498fb86522a56ba
4
+ data.tar.gz: abee7797626806d015d410423a4f929875076f58f5e4859a2567a3f2921424bd
5
5
  SHA512:
6
- metadata.gz: 6c99c218f798feb84115db8a93f9297883e249b9418b2bcdafe7f31da53dc2c1b741c6ded274839df29e25597aeeda818d3d6440a0000f1996d8e8a12233a67c
7
- data.tar.gz: 594daf8423059604af0ba86a8d3e8afff7dd52cffc3b13a3075d0ec66f9fb85b0e17cc15787e89b948f1dc9ad44848558b1b95ef5377ad68dc7a2ca4fd06211b
6
+ metadata.gz: 1370fc47539d7f9504796faddcc71f08c0ecccd8b9af8623ab2a4496eef8e94f535aeb4e7266149a0e759e9115dfa0a062a57ea77db412e366ac07436912ae82
7
+ data.tar.gz: 9761bc6237bb0702e33cbca95e6f896c6ee07dc0efbec8a99d09493b551e162b28c63439320afeed56c6efec07b00621c54f245ab3b88011fe988dab1e2ac5c8
@@ -122,12 +122,15 @@ module Tapioca
122
122
  def compile_alias(name, constant)
123
123
  return if symbol_ignored?(name)
124
124
 
125
- constant_name = name_of(constant)
125
+ target = name_of(constant)
126
+ # If target has no name, let's make it an anonymous class or module with `Class.new` or `Module.new`
127
+ target = "#{constant.class}.new" unless target
128
+
126
129
  add_to_alias_namespace(name)
127
130
 
128
131
  return if IGNORED_SYMBOLS.include?(name)
129
132
 
130
- indented("#{name} = #{constant_name}")
133
+ indented("#{name} = #{target}")
131
134
  end
132
135
 
133
136
  sig do
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Tapioca
5
- VERSION = "0.4.12"
5
+ VERSION = "0.4.13"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tapioca
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.12
4
+ version: 0.4.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ufuk Kayserilioglu
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2021-01-14 00:00:00.000000000 Z
14
+ date: 2021-01-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: pry