Skip to content

Remove compatibility.rb because ::Ruby is reserved for Ruby 3.5Β #46

@kmcphillips

Description

@kmcphillips

Describe the bug
The compatibility.rb file and the Ruby::Anthropic namespace must be removed or not loaded for Ruby 3.5 as ::Ruby is becoming a reserved module name.

https://github.com/alexrudall/ruby-anthropic/blob/main/lib/anthropic/compatibility.rb

To Reproduce
When running with Warning[:deprecated] = true and Ruby 3.4.0:

ruby-anthropic-0.4.2/lib/anthropic/compatibility.rb:1: warning: ::Ruby is reserved for Ruby 3.5

Additional context
I'm happy to PR the change, but I'm not sure what the change should be entirely. This compatibility file is part of the initial commit so I don't know what the deprecation plan is for this. It might be a big headache, unfortunately. But will be needed to continue to run on newest ruby.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions