Permalink
Browse files

Support Ruby 1.9

  • Loading branch information...
1 parent d81bed7 commit 8fa44de76ba4fb71bbe46900c8de27e73d0acfd1 @reidmorrison reidmorrison committed Aug 22, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −0 Rakefile
  2. +1 −1 lib/symmetric_encryption/extensions/active_record/base.rb
  3. +1 −1 lib/symmetric_encryption/version.rb
View
@@ -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'
@@ -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
@@ -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.