demeler 1.0.4 → 1.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3903bce53b962d00a70df078d45ecc40b99cedfb
4
- data.tar.gz: 5ca0c7cfb19aa5366695cab87f87313ae06522e3
3
+ metadata.gz: 728592cb4a1c887e39d1fc9a66bc1e1d6a609538
4
+ data.tar.gz: 3c37351fbb3c337e85d3121fa6f031b61524090b
5
5
  SHA512:
6
- metadata.gz: 85133de7aebdb53534f25ae96bf0df604dcc82292e21cf413bc0a0c4e53d1a186687619e2370b197071f70668e9060990cabbd867be1ef7466f7590ace6fb92a
7
- data.tar.gz: 4f0f0691707eecf112b03fea0d06b1d72a8b5c1c35e0a3e568c4259a753bb042d1bb0b0560ca70790de6be6f66599f7f68ce8e7422a144785d44cddd91eb2c27
6
+ metadata.gz: 8c5d91aca641ac66bbda90b50488b88faae5d0cd0df1511d6d4ae5877c61a82c54aebcfc2cc5e350cd90aa9f9ab8a50a1f34a07088370a35076b6dc3e7e80ee0
7
+ data.tar.gz: ebe33bd9e0d9640a7eab8297bde1c133d6f1acd0a265c41f0ff284d338ab05c8e123b71f0eccbf9bf99ca9678fdbecca8f35c68dc0d20a38d4b63ad11946a81d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.0.5
2
+
3
+ * Had to eliminate a "side effect" by cloning the :href string before using it.
4
+
1
5
  # 1.0.4
2
6
 
3
7
  * Added a `parms` argument to `alink` so that parameters that are being passed can be added as a hash. See the README.
@@ -1,4 +1,4 @@
1
1
  module Version
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  MODIFIED = "2017-06-17"
4
4
  end
data/lib/demeler.rb CHANGED
@@ -122,8 +122,22 @@ class Demeler
122
122
  raise ArgumentError.new("In Demeler#alink, expected Hash for argument 2, opts") if !args.kind_of?(Hash)
123
123
  raise ArgumentError.new("In Demeler#alink, expected an href option in opts") if !args[:href]
124
124
 
125
- href = args.delete(:href).to_s
125
+ # I had to use class.name because the Ruby case doesn't work
126
+ # properly with comparing value.class with Symbol or String.
127
+ # It was necessary to compare value.class.name with "Symbol" and "String".
126
128
  opts = args.clone
129
+ value = opts.delete(:href)
130
+ case value.class.name
131
+ when "Symbol"
132
+ # convert to string
133
+ href = value.to_s
134
+ when "String"
135
+ # clone string
136
+ href = String.new(value)
137
+ else
138
+ href = value
139
+ end
140
+
127
141
  if !parms.empty?
128
142
  href << '?'
129
143
  parms.each do |k,v|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: demeler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael J. Welch, Ph.D.