openurl 0.4.0 → 0.4.1

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 (2) hide show
  1. data/lib/openurl/context_object.rb +3 -3
  2. metadata +1 -1
@@ -302,13 +302,13 @@ module OpenURL
302
302
  hash.each_pair do |key, values|
303
303
  # get a list of all terminal values, whether wrapped
304
304
  # in arrays or not. We're going to mutate them.
305
- [values].flatten.each do | v |
305
+ [values].flatten.compact.each do | v |
306
306
  v.force_encoding(source_encoding)
307
307
  if source_encoding == "UTF-8"
308
- ensure_valid_encoding!(v, :invalid => :replace, :undef => :replace )
308
+ ensure_valid_encoding!(v, :invalid => :replace )
309
309
  else
310
310
  # transcode, replacing any bad chars.
311
- v.encode!("UTF-8", :invalid => :replace)
311
+ v.encode!("UTF-8", :invalid => :replace, :undef => :replace )
312
312
  end
313
313
  end
314
314
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openurl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: