From a29a39e518f248b5a7c4dd73cecbff9fc9ee214a Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Tue, 9 Oct 2012 20:27:04 -0700 Subject: [PATCH] Fix regression in Ruby 1.8.7 Fixes #40 --- CHANGELOG.markdown | 1 + genghis.rb | 2 +- src/rb/genghis/server.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index 0d348698..22441093 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -1,6 +1,7 @@ ## v2.1.1 * Fix #38 — JSON rendering weirdness with empty array properties. + * Fix #40 — Ruby 1.8.7 regression. ## v2.1 diff --git a/genghis.rb b/genghis.rb index e3c6e800..d56bf6a0 100755 --- a/genghis.rb +++ b/genghis.rb @@ -641,7 +641,7 @@ def error_response(status, message) @genghis_version = GENGHIS_VERSION if request.xhr? content_type :json - error(status, {error: message, status: status}.to_json) + error(status, {:error => message, :status => status}.to_json) else error(status, mustache('error.html.mustache'.intern)) end diff --git a/src/rb/genghis/server.rb b/src/rb/genghis/server.rb index 2905d9c0..93529ea0 100644 --- a/src/rb/genghis/server.rb +++ b/src/rb/genghis/server.rb @@ -30,7 +30,7 @@ def error_response(status, message) @genghis_version = GENGHIS_VERSION if request.xhr? content_type :json - error(status, {error: message, status: status}.to_json) + error(status, {:error => message, :status => status}.to_json) else error(status, mustache('error.html.mustache'.intern)) end