im 0.2.1 → 0.2.2

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: e1708fffea9fb79c809dbfa34669e5471556e4d969ae8d95e689cfccc5c6f3e4
4
- data.tar.gz: bce10f72bc879a53bda624ced7534bd0c74fc5666c6ff8545ea9371521edc8b0
3
+ metadata.gz: 12f266a57a80938158b66bdbc0345fcdc0305c11ddaca54e510613426f1ec0ca
4
+ data.tar.gz: f1a64495a579e4fba187e8d1f6db1f3025da5dfe47b7217c255e1e8ff03fd4c6
5
5
  SHA512:
6
- metadata.gz: a112f1ee72916d690c0227a94a16f87d283b93a059f1e01d8681649ac9405ce46add46650234b2e337ace8b8571c64ba4f722f256099263eea04cfaafb3f02e1
7
- data.tar.gz: b7a03df97bcbac97f09c8637f9c8b82fbaaddcd58640aecc2406e821910fe5cb2ed4200ddc2d6490bc0d0d2d42e6a65173bb7a52ba78c7ed2c05126a0edc669b
6
+ metadata.gz: 6a33aaedf83fcf5c85ec424ad6307236ced2a952575348a66689cc54c468e6bee697f7daec25f8259c1e18942ec2b307ac24a524c6c21994efcd376f5fb74fbf
7
+ data.tar.gz: 8f2bcfab90aae5e132a65021169860128586102e7fc405777d96ee505674354ef1f13bf4d8d53810eb04ab2d93ad6602266647765e2c571490122a0915fab481
data/lib/im/const_path.rb CHANGED
@@ -37,6 +37,8 @@ module Im
37
37
  # @sig (Module) -> String?
38
38
  def real_mod_name(mod)
39
39
  UNBOUND_METHOD_MODULE_NAME.bind_call(mod)
40
+ # rescue TypeError
41
+ # binding.irb
40
42
  end
41
43
 
42
44
  # @sig (String) -> Boolean
data/lib/im/loader.rb CHANGED
@@ -349,7 +349,7 @@ module Im
349
349
 
350
350
  private # -------------------------------------------------------------------------------------
351
351
 
352
- # @sig (String, Module) -> void
352
+ # @sig (String, Module?) -> void
353
353
  def set_autoloads_in_dir(dir, parent = self)
354
354
  ls(dir) do |basename, abspath|
355
355
  begin
@@ -390,7 +390,7 @@ module Im
390
390
  def autoload_subdir(parent, cname, subdir)
391
391
  if autoload_path = autoload_path_set_by_me_for?(parent, cname)
392
392
  absolute_cpath = cpath(parent, cname)
393
- relative_cpath = relative_cpath(absolute_cpath, cname)
393
+ relative_cpath = relative_cpath(parent, cname)
394
394
  register_explicit_namespace(cpath, relative_cpath) if ruby?(autoload_path)
395
395
 
396
396
  # We do not need to issue another autoload, the existing one is enough
@@ -516,6 +516,7 @@ module Im
516
516
  else
517
517
  # If an autoloaded file loads an autoloaded constant from another file, we need to deduce the module name
518
518
  # before we can add the parent to module_cpaths. In this case, we have no choice but to work from to_s.
519
+ #binding.irb if parent.is_a?(String)
519
520
  mod_name = Im.cpath(parent)
520
521
  current_module_prefix = "#{Im.cpath(self)}::"
521
522
  raise InvalidModuleName, "invalid module name for #{parent}" unless mod_name.start_with?(current_module_prefix)
data/lib/im/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Im
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: im
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Salzberg