Skip to content

Commit 998e19a

Browse files
committedAug 4, 2013
Revert "Remove support for Ruby 1.8.7"
This reverts commit 64fdb05.
1 parent e712b46 commit 998e19a

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed
 

‎.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
bundler_args: --without development
22
language: ruby
33
rvm:
4+
- 1.8.7
45
- 1.9.2
56
- 1.9.3
67
- 2.0.0

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ then Nokogiri, and finally REXML.
6868
This library aims to support and is [tested against][travis] the following Ruby
6969
implementations:
7070

71+
* Ruby 1.8.7
7172
* Ruby 1.9.2
7273
* Ruby 1.9.3
7374
* Ruby 2.0.0

‎lib/multi_xml.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,9 @@ def symbolize_keys(params)
196196
def undasherize_keys(params)
197197
case params
198198
when Hash
199-
params.each_with_object({}) do |(key, value), hash|
199+
params.inject({}) do |hash, (key, value)|
200200
hash[key.to_s.tr('-', '_')] = undasherize_keys(value)
201+
hash
201202
end
202203
when Array
203204
params.map{|value| undasherize_keys(value)}
@@ -272,8 +273,9 @@ def typecast_xml_value(value, disallowed_types=nil)
272273
elsif value['type'] && value.size == 1 && !value['type'].is_a?(Hash)
273274
nil
274275
else
275-
xml_value = value.each_with_object({}) do |(k, v), hash|
276+
xml_value = value.inject({}) do |hash, (k, v)|
276277
hash[k] = typecast_xml_value(v, disallowed_types)
278+
hash
277279
end
278280

279281
# Turn {:files => {:file => #<StringIO>} into {:files => #<StringIO>} so it is compatible with

‎multi_xml.gemspec

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Gem::Specification.new do |spec|
1616
spec.licenses = ['MIT']
1717
spec.name = 'multi_xml'
1818
spec.require_paths = ['lib']
19-
spec.required_ruby_version = '>= 1.9.2'
2019
spec.required_rubygems_version = '>= 1.3.5'
2120
spec.signing_key = File.expand_path("~/.gem/private_key.pem") if $0 =~ /gem\z/
2221
spec.summary = %q{A generic swappable back-end for XML parsing}

0 commit comments

Comments
 (0)