kamu-wang 0.02 → 0.03

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/wang.rb +2 -2
  2. data/wang.gemspec +1 -1
  3. metadata +3 -3
data/lib/wang.rb CHANGED
@@ -422,14 +422,14 @@ module WANG
422
422
  module Utils
423
423
  # URL-encode a string.
424
424
  def self.escape string
425
- string.gsub(/([^ a-zA-Z0-9_.-]+)/n) do
425
+ string.to_s.gsub(/([^ a-zA-Z0-9_.-]+)/n) do
426
426
  '%' + $1.unpack('H2' * $1.size).join('%').upcase
427
427
  end.tr(' ', '+')
428
428
  end
429
429
 
430
430
  # URL-decode a string.
431
431
  def self.unescape string
432
- string.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n) do
432
+ string.to_s.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n) do
433
433
  [$1.delete('%')].pack('H*')
434
434
  end
435
435
  end
data/wang.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.platform = Gem::Platform::RUBY
3
3
  s.name = 'wang'
4
- s.version = "0.02"
4
+ s.version = "0.03"
5
5
  s.summary = "Web Access with No Grief."
6
6
  s.authors = ["Kamu", "Joux3"]
7
7
  s.email = "mr.kamu@gmail.com"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kamu-wang
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.02"
4
+ version: "0.03"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kamu
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2008-06-05 00:00:00 -07:00
13
+ date: 2008-07-08 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - none
53
53
  rubyforge_project:
54
- rubygems_version: 1.0.1
54
+ rubygems_version: 1.2.0
55
55
  signing_key:
56
56
  specification_version: 2
57
57
  summary: Web Access with No Grief.