summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-02-13 10:15:17 +0900
committerRandy Morgan <[email protected]>2012-02-13 10:15:17 +0900
commitf6ead744b3439ff656165796a4d4bc1c9f47589e (patch)
tree583ee6a7d386a60399dc9c78324f016ea8dc4691
parent2ac78880248f5d88cc8ebe5670f72c481f0f8108 (diff)
downloadcaxlsx-f6ead744b3439ff656165796a4d4bc1c9f47589e.tar.gz
caxlsx-f6ead744b3439ff656165796a4d4bc1c9f47589e.zip
1.8.7 patch to properly scope the defined method
-rw-r--r--lib/axlsx.rb1
1 files changed, 1 insertions, 0 deletions
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