Skip to content

Ruby 3 upgrade throws kernel error for the overwritten each method #232

@kajatiger

Description

@kajatiger

🐞 Bug Report

Steps to reproduce

We have an item that is the first hyperlink to the actual media and need to iterate through the sub nodes of it:

item.sub_nodes.map(&:name).to_s

And then we get an error saying

SystemStackError:
        stack level too deep

since upgrading the rails app to ruby 3 (and rails 6.1)

Expected behavior

We would expect to get a string back that contains the name of each item sub node.

Possible Solution

We don't exactly have a solution, but suppose the answer would be somewhere in the definition of the each block here:

def each(&block)

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