-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Code cleanup #2369
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
Code cleanup #2369
Conversation
'thread_safe' gem is now deprecated and merged into 'concurrent-ruby'. Ref: ruby-concurrency/concurrent-ruby@52e5f37#diff-42d5a45da331eaa07d2b315bd3c9e738
@@ -73,7 +73,7 @@ def self.serializer_lookup_chain_for(klass, namespace = nil) | |||
# Used to cache serializer name => serializer class | |||
# when looked up by Serializer.get_serializer_for. | |||
def self.serializers_cache | |||
@serializers_cache ||= ThreadSafe::Cache.new | |||
@serializers_cache ||= Concurrent::Map.new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kind of odd. I'm not sure where the dependency is coming from. I know later versions of Rails introduce concurrent-ruby. I guess thread_safe was coming from active_support?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thread_safe
is needed by 2 different sources:
active_support
(4.2.11.1)grape
(0.19.0) (throughvirtus
)
def link(name, value = nil) | ||
options[:links][name] = block_given? ? Proc.new : value | ||
def link(name, value = nil, &block) | ||
options[:links][name] = block_given? ? block : value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm installing 2.7 locally so I can figure out what you're seeing. As I wrote in the other PR, this change doesn't make sense to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, this makes more sense
lib/active_model/serializer/reflection.rb:91: warning: Capturing the given block using Proc.new is
deprecated; use&block
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.