Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
AO3-5036 Update to ruby 2.3 #2937
Conversation
zz9pzza
added some commits
Jun 10, 2017
| cache_sweeper :collection_sweeper | ||
| cache_sweeper :feed_sweeper | ||
| # we want to extract the countable params from work_search and move them into their fields | ||
| def clean_work_search_params | ||
| - if params[:work_search].present? && params[:work_search][:query].present? | ||
| + #https://aaronlasseigne.com/2014/07/20/know-ruby-clone-and-dup/ |
sarken
Aug 1, 2017
Owner
Drive-by comment! This page is informative, but I'm not sure which part(s) of it is relevant to the code. A more helpful comment might be something like "We use dup instead of clone here because we don't want to copy the frozen state of the object" or "Using dup here means the original object also gets modified when we do the gt/lt swap below" or whatever.
| - if params[:work_search].present? && params[:work_search][:query].present? | ||
| + #https://aaronlasseigne.com/2014/07/20/know-ruby-clone-and-dup/ | ||
| + clean_params = work_search_params&.dup | ||
| + clean_params[:query] = clean_params[:query].dup unless clean_params[:query].nil? |
sarken
added
the
Awaiting review
label
Jun 13, 2017
sarken
requested changes
Aug 7, 2017
It looks like this has some merge conflicts now that will need to be resolved.
sarken
added
Reviewed: Needs Coder Action
and removed
Awaiting review
labels
Aug 7, 2017
zz9pzza
added some commits
Aug 7, 2017
zz9pzza
added
Coder has actioned review
and removed
Reviewed: Needs Coder Action
labels
Aug 8, 2017
| + # https://aaronlasseigne.com/2014/07/20/know-ruby-clone-and-dup/ | ||
| + # While nearly identical, clone does one more thing than dup. | ||
| + # In clone, the frozen state of the object is also copied. | ||
| + # In dup, it’ll always be thawed. |
| + # In dup, it’ll always be thawed. | ||
| + | ||
| + clean_params = work_search_params&.dup | ||
| + clean_params[:query] = clean_params[:query].dup unless clean_params[:query].nil? |
zz9pzza commentedJun 12, 2017
•
Edited 1 time
-
zz9pzza
Aug 7, 2017
Issue
https://otwarchive.atlassian.net/browse/AO3-5036
Purpose
Update the ruby language to 2.3.
Testing
I would check that work searching works as intended