diff --git a/lib/pdf/core_ext/mutex.rb b/lib/pdf/core_ext/mutex.rb new file mode 100644 index 0000000..fa9e59d --- /dev/null +++ b/lib/pdf/core_ext/mutex.rb @@ -0,0 +1,11 @@ + +unless RUBY_VERSION < '1.9' + class ::Mutex + def marshal_dump + end unless method_defined?(:marshal_dump) + def marshal_load(data) + end unless method_defined?(:marshal_load) + end +end + + diff --git a/lib/pdf/writer.rb b/lib/pdf/writer.rb index a861b3e..6f008b1 100644 --- a/lib/pdf/writer.rb +++ b/lib/pdf/writer.rb @@ -12,6 +12,7 @@ require 'open-uri' require 'transaction/simple' +require 'pdf/core_ext/mutex' require 'color' # A class to provide the core functionality to create a PDF document diff --git a/pdf-writer.gemspec b/pdf-writer.gemspec index ad3fb9a..56a2445 100644 --- a/pdf-writer.gemspec +++ b/pdf-writer.gemspec @@ -23,6 +23,8 @@ Gem::Specification.new do |s| "lib/pdf/charts", "lib/pdf/charts/stddev.rb", "lib/pdf/charts.rb", + "lib/pdf/core_ext", + "lib/pdf/core_ext/mutex.rb", "lib/pdf/math.rb", "lib/pdf/quickref.rb", "lib/pdf/simpletable.rb",