diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/axlsx/workbook/workbook.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb index c5fec5f9..ea733a4f 100644 --- a/lib/axlsx/workbook/workbook.rb +++ b/lib/axlsx/workbook/workbook.rb @@ -89,12 +89,13 @@ require 'axlsx/workbook/worksheet/worksheet.rb' @drawings = SimpleTypedList.new Drawing @charts = SimpleTypedList.new Chart @images = SimpleTypedList.new Pic - self.date1904= options[:date1904].nil? ? is_darwin? : options[:date1904] + self.date1904= options[:date1904].nil? ? is_bsd? : options[:date1904] yield self if block_given? end - def is_darwin? - RUBY_PLATFORM.downcase.include?('darwin') + def is_bsd? + platform = RUBY_PLATFORM.downcase + platform.include?('freebsd') || platform.include?('darwin') end # Instance level access to the class variable 1904 |
