Merge pull request #1180 from DatekWireless/master

Move the guard before the use of metaclass.
Merge branch 'jruby-1_7'