From f9086d63cdc21c4098ad3813640f059f0b8265b6 Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Sat, 15 Jun 2013 09:21:12 +0200 Subject: [PATCH] Updated the doc for const_regexp [ci skip] --- activesupport/lib/active_support/inflector/methods.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index 9f417af826..a2263fa4d0 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -319,7 +319,9 @@ module ActiveSupport private # Mount a regular expression that will match part by part of the constant. - # For instance, Foo::Bar::Baz will generate Foo(::Bar(::Baz)?)? + # + # const_regexp("Foo::Bar::Baz") # => /Foo(::Bar(::Baz)?)?/ + # const_regexp("::") # => /::/ def const_regexp(camel_cased_word) #:nodoc: parts = camel_cased_word.split("::")