aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/multibyte
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/multibyte')
-rw-r--r--activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb b/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb
index e4ef98f1b6..2e7e9fac3f 100644
--- a/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb
+++ b/activesupport/lib/active_support/multibyte/handlers/utf8_handler.rb
@@ -255,6 +255,8 @@ module ActiveSupport::Multibyte::Handlers #:nodoc:
elsif args[0].kind_of? Range
cps = u_unpack(str).slice(*args)
cps.nil? ? nil : cps.pack('U*')
+ elsif args[0].kind_of? Regexp
+ str.slice(*args)
elsif args.size == 1 && args[0].kind_of?(Numeric)
u_unpack(str)[args[0]]
else