ruby-nuggets 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to ruby-nuggets version 0.4.4
5
+ This documentation refers to ruby-nuggets version 0.4.5
6
6
 
7
7
 
8
8
  == DESCRIPTION
@@ -67,7 +67,10 @@ class String
67
67
  }
68
68
 
69
69
  gsub!(Regexp.union(*keys)) { |match|
70
- cache[match] ||= subs.find { |key, _| key =~ match }.last.evaluate(binding)
70
+ cache[match] ||= begin
71
+ eval("__match__ = #{match.inspect}", binding)
72
+ subs.find { |key, _| key =~ match }.last.evaluate(binding)
73
+ end
71
74
  }
72
75
  end
73
76
 
@@ -90,4 +93,6 @@ if $0 == __FILE__
90
93
  warn err
91
94
  end
92
95
  p s.msub('r' => '???', 'z' => '#{t}', :__binding__ => binding)
96
+
97
+ p s.msub(/[A-Z]/ => '#{__match__.downcase}', :__binding__ => binding)
93
98
  end
@@ -4,7 +4,7 @@ module Nuggets
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 4
7
- TINY = 4
7
+ TINY = 5
8
8
 
9
9
  class << self
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-nuggets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Wille