Commit 7885605e authored by Fabio Pelosin's avatar Fabio Pelosin

[Gemspec] Fix for Ruby 1.9.3

parent 11a0bd68
......@@ -53,7 +53,7 @@ Gem::Specification.new do |s|
if File.exists?(changelog_path)
title_token = '## '
current_verison_title = title_token + Pod::VERSION.to_s
full_changelog = File.read('CHANGELOG.md')
full_changelog = File.open(changelog_path, "r:UTF-8") { |f| f.read }
current_version_index = full_changelog.index(/^#{current_verison_title}/)
previous_version_index = full_changelog.index(/^#{title_token}/, current_version_index + title_token.length)
relevant = full_changelog[current_version_index..previous_version_index-1]
......
......@@ -2,7 +2,7 @@
#-----------------------------------------------------------------------------#
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("1.9")
if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new("1.9")
if ENV['CI'] || ENV['GENERATE_COVERAGE']
require 'simplecov'
require 'coveralls'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment