Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails has removed SecureRandom from ActiveSupport in Rails 3.2, deprecated #1087

Merged
merged 2 commits into from May 24, 2011
Merged

Conversation

kalbasit
Copy link
Contributor

Rails has remove SecureRandom from ActiveSupport in Rails 3.2, deprecated in 3.1

Since it has been deprecated, this patch favors SecureRandom on ActiveSupport::SecureRandom

Source: Commit on the rails repository

…ated in 3.1


Since it has been deprecated, this patch favors SecureRandom on ActiveSupport::SecureRandom
@masterkain
Copy link
Contributor

+1

@josevalim
Copy link
Contributor

We don't even need the defined? check as ::SecureRandom is available since 1.8.7. We just need to require secure random at the top and use it!

@kalbasit
Copy link
Contributor Author

@josevalim, I adjusted the patch accordingly...

I was aware that it's included since 1.8.7 but my original patch was to avoid situations like mine last night, I was working on my project, one minute all my 200+ test passing, another none were passing.. because I updated my rails repo which happens to get updated at the same time as I ran bundle update..

but I don't think anyone is still using ruby <1.8.7 and wants to dive in rails 3.1

@josevalim
Copy link
Contributor

Rails 3.0 and 3.1 does not even support < 1.8.7. :)

josevalim added a commit that referenced this pull request May 24, 2011
Rails has removed SecureRandom from ActiveSupport in Rails 3.2, deprecated
@josevalim josevalim merged commit acd1c76 into heartcombo:master May 24, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants