Skip to content

Commit

Permalink
Support Ruby 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
reidmorrison committed Aug 22, 2012
1 parent d81bed7 commit 8fa44de
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Rakefile
@@ -1,6 +1,7 @@
lib = File.expand_path('../lib/', __FILE__)
$:.unshift lib unless $:.include?(lib)

require 'rubygems'
require 'rake/clean'
require 'rake/testtask'
require 'date'
Expand Down
2 changes: 1 addition & 1 deletion lib/symmetric_encryption/extensions/active_record/base.rb
Expand Up @@ -128,7 +128,7 @@ def method_missing_with_attr_encrypted(method, *args, &block)
attribute_names = match.captures.last.split('_and_')
attribute_names.each_with_index do |attribute, index|
encrypted_name = "encrypted_#{attribute}"
if instance_methods.include? encrypted_name #.to_sym in 1.9
if method_defined? encrypted_name.to_sym
args[index] = ::SymmetricEncryption.encrypt(args[index])
attribute_names[index] = encrypted_name
end
Expand Down
2 changes: 1 addition & 1 deletion lib/symmetric_encryption/version.rb
@@ -1,4 +1,4 @@
# encoding: utf-8
module SymmetricEncryption #:nodoc
VERSION = "0.7.1"
VERSION = "0.7.2"
end

0 comments on commit 8fa44de

Please sign in to comment.