openurl 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
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: