unicode-multibyte 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/.Rakefile.swp CHANGED
Binary file
Binary file
data/Rakefile CHANGED
@@ -14,5 +14,5 @@ end
14
14
 
15
15
  desc 'Builds and installs the gem'
16
16
  task :install => :build do
17
- sh "gem install unicode-multibyte-0.2.3"
17
+ sh "gem install unicode-multibyte-0.2.4"
18
18
  end
@@ -125,7 +125,7 @@ module UnicodeMultibyte::Multibyte
125
125
  @@handler = klass
126
126
  end
127
127
 
128
- # Returns the proper handler for the contained string depending on $KCODE and the encoding of the string. This
128
+ # Returns the proper handler for the contained string depending on $MULTIBYTE_CODE and the encoding of the string. This
129
129
  # method is used internally to always redirect messages to the proper classes depending on the context.
130
130
  def handler
131
131
  if utf8_pragma?
@@ -137,10 +137,10 @@ module UnicodeMultibyte::Multibyte
137
137
 
138
138
  private
139
139
 
140
- # +utf8_pragma+ checks if it can send this string to the handlers. It makes sure @string isn't nil and $KCODE is
140
+ # +utf8_pragma+ checks if it can send this string to the handlers. It makes sure @string isn't nil and $MULTIBYTE_CODE is
141
141
  # set to 'UTF8'.
142
142
  def utf8_pragma?
143
- !@string.nil? && ($KCODE == 'UTF8')
143
+ !@string.nil? && ($MULTIBYTE_CODE == 'UTF8')
144
144
  end
145
145
  end
146
146
  end
@@ -1,4 +1,4 @@
1
- # Chars uses this handler when $KCODE is not set to 'UTF8'. Because this handler doesn't define any methods all call
1
+ # Chars uses this handler when $MULTIBYTE_CODE is not set to 'UTF8'. Because this handler doesn't define any methods all call
2
2
  # will be forwarded to String.
3
3
  class UnicodeMultibyte::Multibyte::Handlers::PassthruHandler
4
4
 
@@ -52,7 +52,7 @@ module UnicodeMultibyte::Multibyte::Handlers
52
52
  end
53
53
 
54
54
  # UTF8Handler implements Unicode aware operations for strings, these operations will be used by the Chars
55
- # proxy when $KCODE is set to 'UTF8'.
55
+ # proxy when $MULTIBYTE_CODE is set to 'UTF8'.
56
56
  class UTF8Handler
57
57
  # Hangul character boundaries and properties
58
58
  HANGUL_SBASE = 0xAC00
@@ -1,4 +1,4 @@
1
- $KCODE = "UTF8"
1
+ $MULTIBYTE_CODE = "UTF8"
2
2
 
3
3
  module UnicodeMultibyte
4
4
  module Multibyte
@@ -10,14 +10,8 @@ end
10
10
 
11
11
  require File.join(File.dirname(__FILE__), "multibyte", "chars")
12
12
 
13
- module Kernel
14
- def u(str)
15
- UnicodeMultibyte::Multibyte::Chars.new(str)
16
- end
17
- end
18
-
19
13
  class String
20
14
  def mb_chars
21
- u(self)
15
+ UnicodeMultibyte::Multibyte::Chars.new(self)
22
16
  end
23
17
  end
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "unicode-multibyte"
6
- s.version = "0.2.3"
6
+ s.version = "0.2.4"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Kevin Le"]
9
9
  s.email = ["kle@ooyala.com"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode-multibyte
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 3
10
- version: 0.2.3
9
+ - 4
10
+ version: 0.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kevin Le
@@ -40,10 +40,6 @@ files:
40
40
  - lib/unicodechars.rb
41
41
  - Rakefile
42
42
  - setup.rb
43
- - unicode-multibyte-0.1.0.gem
44
- - unicode-multibyte-0.2.0.gem
45
- - unicode-multibyte-0.2.1.gem
46
- - unicode-multibyte-0.2.2.gem
47
43
  - unicode-multibyte.gemspec
48
44
  - .project
49
45
  - .Rakefile.swp
Binary file
Binary file
Binary file
Binary file