Skip to content

Commit

Permalink
Fix more outdated references
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerwi committed Oct 13, 2018
1 parent b07a686 commit 136d5fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cregularity.cr
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Cregularity

def between(range, pattern)
unless range.size == 2 && range.any? { |i| i.is_a?(Int) }
raise Regularity::Error.new("must provide an array of 2 elements, one of them must be an integer")
raise Cregularity::Error.new("must provide an array of 2 elements, one of them must be an integer")
end

write "%s{%s,%s}" % [interpret(pattern), range[0], range[1]]
Expand Down Expand Up @@ -91,15 +91,15 @@ class Cregularity
forward_missing_to regex

def to_s
"#<Regularity:#{object_id} regex=/#{@str}/>"
"#<Cregularity:#{object_id} regex=/#{@str}/>"
end

def inspect
to_s
end

private def write(str, *args)
raise Regularity::Error.new("#end_with has already been called") if @ended
raise Cregularity::Error.new("#end_with has already been called") if @ended
if args.nil? || args == Tuple.new
@str += str
else
Expand Down Expand Up @@ -133,7 +133,7 @@ class Cregularity
# Ex: (2, "x") or (3, :digits)
private def numbered_constraint(count, _type)
pattern = patterned_constraint(_type)
raise Regularity::Error.new("Unrecognized pattern") if pattern.nil? || pattern.empty?
raise Cregularity::Error.new("Unrecognized pattern") if pattern.nil? || pattern.empty?
"%s{%s}" % [pattern, count]
end

Expand Down

0 comments on commit 136d5fe

Please sign in to comment.