lib/hexapdf/task/optimize.rb in hexapdf-0.6.0 vs lib/hexapdf/task/optimize.rb in hexapdf-0.7.0

- old
+ new

@@ -1,12 +1,12 @@ -# -*- encoding: utf-8 -*- +# -*- encoding: utf-8; frozen_string_literal: true -*- # #-- # This file is part of HexaPDF. # # HexaPDF - A Versatile PDF Creation and Manipulation Library For Ruby -# Copyright (C) 2014-2017 Thomas Leitner +# Copyright (C) 2014-2018 Thomas Leitner # # HexaPDF is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License version 3 as # published by the Free Software Foundation with the addition of the # following permission added to Section 15 as permitted in Section 7(a): @@ -155,11 +155,11 @@ if count == 200 objstms << doc.wrap(Type: :ObjStm) count = 0 end end - objstms.each {|objstm| doc.add(objstm, revision: rev_index)} + objstms.each {|objstm| doc.add(objstm, revision: rev_index) } doc.add({Type: :XRef}, revision: rev_index) unless xref_stream end end end @@ -220,10 +220,11 @@ @result = ''.b @serializer = HexaPDF::Serializer.new end def process(op, operands) #:nodoc: - @result << HexaPDF::Content::Operator::DEFAULT_OPERATORS[op.intern].serialize(@serializer, *operands) + @result << HexaPDF::Content::Operator::DEFAULT_OPERATORS[op]. + serialize(@serializer, *operands) end end end