dic 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/dic.rb +8 -2
  2. data/lib/dic/version.rb +1 -1
  3. metadata +2 -2
data/lib/dic.rb CHANGED
@@ -9,6 +9,10 @@ class Dic
9
9
  @stack = []
10
10
  end
11
11
 
12
+ def respond_to_missing?(name,include_private)
13
+ self[name] or super
14
+ end
15
+
12
16
  def method_missing(name, *args, &proc)
13
17
  # setter
14
18
  if args.size == 1 || !proc.nil?
@@ -16,9 +20,11 @@ class Dic
16
20
  self[name]= args.first || proc
17
21
  # getter
18
22
  elsif args.empty? && proc.nil?
19
- self[name] or raise DicError, "#{self.class}: undefined entry #{name}"
23
+ self[name] or super
24
+ # raise DicError, "#{self.class}: undefined entry #{name}"
20
25
  else
21
- raise ArgumentError, "invalid argument #{name}, #{args.inspect}"
26
+ super
27
+ #raise ArgumentError, "invalid argument #{name}, #{args.inspect}"
22
28
  end
23
29
  end
24
30
 
data/lib/dic/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dic
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-27 00:00:00.000000000 Z
12
+ date: 2013-04-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake