Skip to content

Replace OpenStruct #8

Closed
Closed

Description

@kuredev

This library uses OpenStruct to generate API responses.
https://github.com/microcmsio/microcms-ruby-sdk/blob/v1.2.0/lib/microcms.rb#L33

But OpenStruct is officially discouraged since Ruby 3.0.0.
https://docs.ruby-lang.org/ja/latest/doc/news=2f3_0_0.html

I think, to upgrade Ruby 3.0 or later, OpenStruct should be replated.

Activity

  1. kuredev commented on Jan 4, 2026

    @kuredev
    Author

    📝 Description

    I confirmed this issue on Ruby 3.4.

    Without adding require 'ostruct' to lib/microcms.rb, the following error occurs when parsing JSON responses.

    🛑 Error

    uninitialized constant MicroCMS::HttpUtil::OpenStruct (NameError)

  2. nemuvski commented on Jul 2, 2026

    @nemuvski
    Member

    Closing this issue as it's been addressed in #13 .

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