y_support 2.1.0 → 2.1.1

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
  SHA1:
3
- metadata.gz: d09cacddac5d80bc24a3064513b05fe98bb55535
4
- data.tar.gz: a17182ae74bb384a3c4d13abf7dc34c3a4bf5060
3
+ metadata.gz: cc599e5fe91dcb19ccd68fd32429f95b63ded715
4
+ data.tar.gz: 2bc37581f0ccd3a5bbe9496ec289b0b883958dfc
5
5
  SHA512:
6
- metadata.gz: 148b04b34ba5dc66cb8d09543ae78c8558203fd8107844c0958a06e609c9dced068bbbce52052a1a66040dafa199e6a6d8f95269f6fb3fc8402a5151d4500dba
7
- data.tar.gz: bb923dc9a8b48d19bd89705e104f63251078c5e78800bbaac7b58dc182b1000e6514d3241f57b077963038af8f1b0daae2f8fd5cc454dfd55e0839cbf308688e
6
+ metadata.gz: 8c7f97c8a6d64c095ff12c9372b300c9a4a9bb5086537c3caee403e03b68a45dd1a0ddc8319b9bf1b94a9f31667f63d11a8d8cb846cd97b91707d79f54535976
7
+ data.tar.gz: c70caa248db66904b1d1393c41fd48bee5abf70a9cc9a326ab766e62196975ee2b6b93de8267e30c5da950e877ad8c0a24461cc0a5dc1dab0c4224f8e3f16fa7
@@ -152,10 +152,6 @@ module NameMagic
152
152
  # Checks all the constants in some module's namespace, recursively.
153
153
  #
154
154
  def serve_all_modules
155
- if DEBUG then
156
- puts "#{self}#serve_all_modules invoked!"
157
- if name.nil? then puts "(ancestors: #{ancestors.take( 4 ).join ', '}" end
158
- end
159
155
  todo = ( nameless_instances + __avid_instances__ ).map( &:object_id ).uniq
160
156
  ObjectSpace.each_object Module do |ɱ|
161
157
  ɱ.constants( false ).each do |const_ß|
@@ -163,13 +159,13 @@ module NameMagic
163
159
  ◉ = ɱ.const_get( const_ß ) # insurance against const. loading fails
164
160
  rescue LoadError, StandardError; next end
165
161
  next unless todo.include? ◉.object_id
166
- puts "NameMagic: Anonymous object under #{const_ß}!" if DEBUG
167
- if ◉.avid? then puts "NameMagic: It is avid." if DEBUG
162
+ # puts "NameMagic: Anonymous object under #{const_ß}!" if DEBUG
163
+ if ◉.avid? then # puts "NameMagic: It is avid." if DEBUG
168
164
  ◉.make_not_avid! # 1. Remove it from the list of avid instances.
169
165
  ◉.name! const_ß # 2. Name it rudely.
170
- else puts "NameMagic: It is not avid." if DEBUG
166
+ else # puts "NameMagic: It is not avid." if DEBUG
171
167
  ɴ = validate_name( name_set_hook.( const_ß, ◉, nil ) ).to_sym
172
- puts "NameMagic: Name adjusted to #{ɴ}." if DEBUG
168
+ # puts "NameMagic: Name adjusted to #{ɴ}." if DEBUG
173
169
  conflicter = begin; const_get( ɴ ); rescue NameError; end
174
170
  if conflicter then
175
171
  msg = "Another #{self}-registered instance named '#{ɴ}' exists!"
@@ -6,7 +6,7 @@ class Matrix
6
6
  # Pretty inspect
7
7
  def pretty_inspect
8
8
  return inspect if row_size == 0 or column_size == 0
9
- aa = send(:rows).each.with_object [] do |row, memo|
9
+ aa = send( :rows ).each.with_object [] do |row, memo|
10
10
  memo << row.map{ |o|
11
11
  os = o.to_s
12
12
  case o
@@ -14,9 +14,9 @@ class Matrix
14
14
  else o.to_s end
15
15
  }
16
16
  end
17
- width = aa.map{ |row| row.map( &:size ).max }.max + 1
17
+ width = aa.map { |row| row.map( &:size ).max }.max + 1
18
18
  aa.each_with_object "" do |row, memo|
19
- row.each{ |e| memo << e << ' ' * ( width - e.size ) }
19
+ row.each { |e| memo << e << ' ' * ( width - e.size ) }
20
20
  memo << "\n"
21
21
  end
22
22
  end
@@ -1,4 +1,4 @@
1
1
  module YSupport
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  DEBUG = false
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: y_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - boris