Skip to content

Upgrading tzinfo to 1.2.7 causes: undefined method untaint' for class Enumerable::Recursor'  #295

Description

@TylerRick

In my Rails project, when I upgraded tzinfo to 1.2.7 it caused this error whenever I tried to boot the app:

      facets/lib/core/facets/enumerable/recursively.rb:19:in `private': undefined method `untaint' for class `Enumerable::Recursor'

I was able to reproduce in more minimal context with:

      require 'tzinfo/ruby_core_support'
      class C; private :untaint; end

It looks like 'tzinfo/ruby_core_support' adds untaint method to Object using a refinement, which somehow isn't compatible with what facets does. Anyone have an idea how to fix this on the facets side?

Maybe as simple as just adding untaint as an exception to this line (which caused the error)?:

    instance_methods(true).each{ |m| private m unless /^(__|object_id$)/ =~ m.to_s }

but that seems brittle.

Why are we making these private anyway? Is there a better way we could do this? BasicObject?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions