diff options
author | Hitendra Singh <hitendrasingh1985@gmail.com> | 2013-09-20 12:37:51 +0530 |
---|---|---|
committer | Hitendra Singh <hitendrasingh1985@gmail.com> | 2013-09-20 12:50:15 +0530 |
commit | 1afe1aeba528249fc6be8bda4dad6a4dd243646d (patch) | |
tree | 43bab17b01ca32c990aa0aeaff2b889a0fa47e33 /activesupport/lib/active_support | |
parent | 5923ae63210e4ab639a82a7ff20b4fad73ff76bb (diff) | |
download | rails-1afe1aeba528249fc6be8bda4dad6a4dd243646d.tar.gz rails-1afe1aeba528249fc6be8bda4dad6a4dd243646d.tar.bz2 rails-1afe1aeba528249fc6be8bda4dad6a4dd243646d.zip |
Initializing Codepoint object with default values
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/multibyte/unicode.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/multibyte/unicode.rb b/activesupport/lib/active_support/multibyte/unicode.rb index 04e6b71580..1845c6ae38 100644 --- a/activesupport/lib/active_support/multibyte/unicode.rb +++ b/activesupport/lib/active_support/multibyte/unicode.rb @@ -287,6 +287,13 @@ module ActiveSupport class Codepoint attr_accessor :code, :combining_class, :decomp_type, :decomp_mapping, :uppercase_mapping, :lowercase_mapping + # Initializing Codepoint object with default values + def initialize + @combining_class = 0 + @uppercase_mapping = 0 + @lowercase_mapping = 0 + end + def swapcase_mapping uppercase_mapping > 0 ? uppercase_mapping : lowercase_mapping end |