oga 2.9 → 2.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50b5eac4cf1caefe82ec313588b10244f41d9d9e
4
- data.tar.gz: 8384365d741110e61afb7a9010f4b792b418d286
3
+ metadata.gz: ca054209a46ed02cebe34a35ced0ca734c5a3394
4
+ data.tar.gz: f442f7a6c6e000ffd5c6c629a8769bdc8803f3cc
5
5
  SHA512:
6
- metadata.gz: c00fa4fbe27a8a31e655011190c7c87c9b7eddf54071e3c99d0fefe0b136f1ef7b8d6effdd20896f2b1f14eff28e4110b72e504dab406671b3624f008a88b1d3
7
- data.tar.gz: fa02ff9fa46578343abc34c9f566a6d88e4e704348e4440f4b9b822c7dcd66ed03acc66ca4d663f04a8da7fc4a1434ca23e89f53e904dbe32d5199b3126bbdd4
6
+ metadata.gz: dd42fb7567835ad7ca296370c05da3caa5c4415bcc58e8b977a1812a8cb91be4b3cfd5571be94ed563165724f4c1d40dd2bb88048ea0be13beeccf1d54887c9c
7
+ data.tar.gz: 2ef7c1f07b5bdbabb5ebd69fe7251941dfe1b30b712c26eed704d1ef838fb6f651d9010b5051ae91bf95576ac406a886f1e34839fd80ae68c5bcfb8215ac38f6
@@ -1,3 +1,3 @@
1
1
  module Oga
2
- VERSION = '2.9'
2
+ VERSION = '2.10'
3
3
  end # Oga
@@ -64,14 +64,14 @@ module Oga
64
64
  #
65
65
  # @return [Oga::XML::Attribute]
66
66
  def attribute(name)
67
- if html?
68
- ns = nil
67
+ name_str, ns = if html?
68
+ [name.to_s, nil]
69
69
  else
70
- name, ns = split_name(name)
70
+ split_name(name)
71
71
  end
72
72
 
73
73
  attributes.each do |attr|
74
- return attr if attribute_matches?(attr, ns, name)
74
+ return attr if attribute_matches?(attr, ns, name_str)
75
75
  end
76
76
 
77
77
  return
@@ -115,10 +115,10 @@ module Oga
115
115
  if found
116
116
  found.value = value
117
117
  else
118
- name, ns = split_name(name)
118
+ name_str, ns = split_name(name)
119
119
 
120
120
  attr = Attribute.new(
121
- :name => name,
121
+ :name => name_str,
122
122
  :namespace_name => ns,
123
123
  :value => value
124
124
  )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oga
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.9'
4
+ version: '2.10'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yorick Peterse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-10 00:00:00.000000000 Z
11
+ date: 2017-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast