Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Preparing release 1.5.1.

  • Loading branch information...
commit 36f9351183922b8d6901ae0f028f78c0392b5194 1 parent 0909d92
@janfri authored
Showing with 7 additions and 3 deletions.
  1. +3 −0  Changelog
  2. +4 −3 lib/mini_exiftool.rb
View
3  Changelog
@@ -1,3 +1,6 @@
+v1.5.1
+- Make rational values work on Ruby 1.8.7.
+
v1.5.0
- Supporting exiftool command-line option -m.
rubyforge request [#29587]
View
7 lib/mini_exiftool.rb
@@ -16,6 +16,7 @@
require 'fileutils'
require 'tempfile'
require 'pstore'
+require 'rational'
require 'set'
require 'shellwords'
require 'time'
@@ -32,7 +33,7 @@ class MiniExiftool
attr_reader :filename
attr_accessor :numerical, :composite, :convert_encoding, :ignore_minor_errors, :errors, :timestamps
- VERSION = '1.5.0'
+ VERSION = '1.5.1'
# +opts+ support at the moment
# * <code>:numerical</code> for numerical values, default is +false+
@@ -345,8 +346,8 @@ def parse_line line
# nothing => String
when /^-?\d+$/
value = value.to_i
- when %r(^\d+/\d+$)
- value = Rational(value)
+ when %r(^(\d+)/(\d+)$)
+ value = Rational($1.to_i, $2.to_i)
when /^[\d ]+$/
# nothing => String
when /#{@@separator}/
Please sign in to comment.
Something went wrong with that request. Please try again.