houdinirx 0.0.2 → 0.0.3

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.
@@ -27,7 +27,6 @@ module Houdini
27
27
  @regexp = match_string.gsub(/\s/, "\\s*")
28
28
  replace_expressions!(@regexp)
29
29
  r = Regexp.new(@regexp, options)
30
- puts r.inspect
31
30
  Houdini::MatchResult.new(text.match(r), @captures)
32
31
  end
33
32
 
@@ -46,7 +45,11 @@ module Houdini
46
45
  if regex =~ /\(#{name}\)/
47
46
  @captures << name
48
47
  end
49
- r = Houdini[r].source if r.class == Symbol
48
+ if r.class == Symbol
49
+ defined_regex = Houdini[r]
50
+ raise "Regexp :#{r} undefined in Houdinirx. Have you added it?" if defined_regex.nil?
51
+ r = defined_regex.source
52
+ end
50
53
  r = r.source if r.class == Regexp
51
54
  regex.gsub!(name, r)
52
55
  end
@@ -1,3 +1,3 @@
1
1
  module Houdini
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: houdinirx
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Eric Campbell