diff options
author | claudiob <claudiob@gmail.com> | 2014-12-03 17:05:02 -0800 |
---|---|---|
committer | claudiob <claudiob@gmail.com> | 2014-12-03 21:58:02 -0800 |
commit | e428ddececf43923dec4299c40b29451e5bea80d (patch) | |
tree | 5a30750a6f8b5e991dbfa5690e8b9556679c4ec8 /activerecord/test/fixtures/all/tasks.yml | |
parent | a83ad97f473a684417dc22fd7854ee5526e1b8ca (diff) | |
download | rails-e428ddececf43923dec4299c40b29451e5bea80d.tar.gz rails-e428ddececf43923dec4299c40b29451e5bea80d.tar.bz2 rails-e428ddececf43923dec4299c40b29451e5bea80d.zip |
Remove "rescue" clause around "require 'openssl'"
Some `require 'openssl'` statements were surrounded by `rescue` blocks to deal with Ruby versions that did not support `OpenSSL::Digest::SHA1` or `OpenSSL::PKCS5`.
[As @jeremy explains](https://github.com/rails/rails/commit/a6a0904fcb12b876469c48b1c885aadafe9188cf#commitcomment-8826666) in the original commit:
> If jruby didn't have jruby-openssl gem, the require wouldn't work. Not sure whether either of these are still relevant today.
According to the [release notes for JRuby 1.7.13](http://www.jruby.org/2014/06/24/jruby-1-7-13.html):
> jruby-openssl 0.9.5 bundled
which means the above `rescue` block is not needed anymore.
All the Ruby versions supported by the current version of Rails provide those OpenSSL libraries, so Travis CI should also be happy by removing the `rescue` blocks.
---
Just to confirm, with JRuby:
$ ruby --version #=> jruby 1.7.16.1 (1.9.3p392) 2014-10-28 4e93f31 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_20-b26 +jit [darwin-x86_64]
$ irb
irb(main):001:0> require 'openssl' #=> true
irb(main):002:0> OpenSSL::Digest::SHA1 #=> OpenSSL::Digest::SHA1
irb(main):003:0> OpenSSL::PKCS5 # => OpenSSL::PKCS5
And with Ruby 2.1:
$ ruby --version #=> ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
$ irb
irb(main):001:0> require 'openssl' #=> true
irb(main):002:0> OpenSSL::Digest::SHA1 #=> OpenSSL::Digest::SHA1
irb(main):003:0> OpenSSL::PKCS5 #=> OpenSSL::PKCS5
Diffstat (limited to 'activerecord/test/fixtures/all/tasks.yml')
0 files changed, 0 insertions, 0 deletions