Skip to content

Instantly share code, notes, and snippets.

@paul
Created May 11, 2011 17:55
Show Gist options
  • Save paul/966950 to your computer and use it in GitHub Desktop.
Save paul/966950 to your computer and use it in GitHub Desktop.
>> Regexp.compile('(')
RegexpError: premature end of regular expression: /(/
from (irb):13:in `initialize'
from (irb):13:in `compile'
from (irb):13
from :0
>> Regexp.compile('foo{1|2}')
(irb):14: warning: regexp has invalid interval
(irb):14: warning: regexp has `}' without escape
=> foo{12}
>> Regexp.compile('foo{1|2}'); $!.backtrace
(irb):15: warning: regexp has invalid interval
(irb):15: warning: regexp has `}' without escape
NoMethodError: undefined method `backtrace' for nil:NilClass
from (irb):15
from :0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment