bin/pdf2ruby in origami-2.0.0 vs bin/pdf2ruby in origami-2.0.1

- old
+ new

@@ -183,11 +183,11 @@ rubyname = nameToRuby(key) subintname = "#{internalname}[#{rubyname}]" if val.is_a?(Origami::Reference) and @var_hash[val] and @var_hash[val][0,3] == "obj" oldname = @var_hash[val] - newname = (key.value.to_s.downcase.gsub(/[^[[:alnum:]]]/,'_') + "_" + @var_hash[val][4..-1]).gsub('.','_') + newname = (key.value.to_s.downcase.gsub(/[^[[:alnum:]]]/,'_') + "_" + @var_hash[val][4..-1]).tr('.', '_') if not @obj_route.include?(oldname) @var_hash[val] = newname @code_hash[newname] = @code_hash[oldname] @code_hash.delete(oldname) @@ -215,11 +215,11 @@ rubyname = nameToRuby(key) subintname = "#{internalname}[#{rubyname}]" if val.is_a?(Origami::Reference) and @var_hash[val] and @var_hash[val][0,3] == "obj" oldname = @var_hash[val] - newname = (key.value.to_s.downcase + "_" + @var_hash[val][4..-1]).gsub('.','_') + newname = (key.value.to_s.downcase + "_" + @var_hash[val][4..-1]).tr('.', '_') if not @obj_route.include?(oldname) @var_hash[val] = newname @code_hash[newname] = @code_hash[oldname] @code_hash.delete(oldname) @@ -235,10 +235,10 @@ code end def streamToRuby(stm, internalname) - dict = stm.dictionary.dup.delete_if{|k,v| k == :Length} + dict = stm.dictionary.dup.delete_if {|k, _| k == :Length} code = "Stream.new(" if @options[:xstreams] stmdir = File.join(TARGET_DIR, STREAM_DIR)