From f6ead744b3439ff656165796a4d4bc1c9f47589e Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Mon, 13 Feb 2012 10:15:17 +0900 Subject: 1.8.7 patch to properly scope the defined method --- lib/axlsx.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/axlsx.rb b/lib/axlsx.rb index 50f9dfa5..b56f82cf 100644 --- a/lib/axlsx.rb +++ b/lib/axlsx.rb @@ -36,6 +36,7 @@ require 'time' # I am a very big fan of activesupports instance_values method, but do not want to require nor include the entire # library just for this one method. if !Object.respond_to?(:instance_values) + Object.send :public # patch for 1.8.7 as it uses private scope Object.send :define_method, :instance_values do Hash[instance_variables.map { |name| [name.to_s[1..-1], instance_variable_get(name)] }] end -- cgit v1.2.3