named-parameters 0.0.17 → 0.0.18

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.
@@ -1,3 +1,8 @@
1
+ 0.0.18 [Dec 10, 201D]
2
+ - [INTERNAL] No longer relies on self.name to determine the current class'
3
+ name, because singleton method name in Class could also be overriden.
4
+ See: [Issue #3](https://github.com/jurisgalang/named-parameters/issues#issue/3)
5
+
1
6
  0.0.17 [Dec 7, 2010]
2
7
  - [BUGFIX] filter_parameters method wasn't computing the correct context for
3
8
  its caller.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.17
1
+ 0.0.18
@@ -299,7 +299,7 @@ module NamedParameters
299
299
  apply_method_spec :"self.#{name}" do
300
300
  method = self.eigenclass.instance_method name
301
301
  spec = method_specs[key_for :"self.#{name}"]
302
- owner = "#{self.name}::"
302
+ owner = "#{self}::"
303
303
  eigenclass.instance_eval do
304
304
  intercept method, owner, name, spec
305
305
  end
@@ -312,7 +312,7 @@ module NamedParameters
312
312
  apply_method_spec name do
313
313
  method = instance_method name
314
314
  spec = method_specs[key_for name]
315
- owner = "#{self.name}#"
315
+ owner = "#{self}#"
316
316
  intercept method, owner, name, spec
317
317
  end
318
318
  super
@@ -364,7 +364,7 @@ module NamedParameters
364
364
  def key_for method
365
365
  type = method.to_s =~ /^self\./ ? :singleton : :instance
366
366
  name = method.to_s.sub(/^self\./, '')
367
- :"#{self.name}::#{type}.#{name}"
367
+ :"#{self}::#{type}.#{name}"
368
368
  end
369
369
 
370
370
  # check if in the process of instrumenting a method
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{named-parameters}
8
- s.version = "0.0.17"
8
+ s.version = "0.0.18"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Juris Galang"]
12
- s.date = %q{2010-12-07}
12
+ s.date = %q{2010-12-10}
13
13
  s.description = %q{This gem simulates named-parameters in Ruby.
14
14
  It's a complement to the common Ruby idiom of using Hash args to emulate
15
15
  the use of named parameters. }
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 17
9
- version: 0.0.17
8
+ - 18
9
+ version: 0.0.18
10
10
  platform: ruby
11
11
  authors:
12
12
  - Juris Galang
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-07 00:00:00 -08:00
17
+ date: 2010-12-10 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -128,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
130
130
  - !ruby/object:Gem::Version
131
- hash: 3220256542107375032
131
+ hash: 1882769076766233734
132
132
  segments:
133
133
  - 0
134
134
  version: "0"