Why does an instance of Symbol respond_to? :dup

Consider the following case:

define a symbol

name = :ευκλειδης

name.respond_to? :dup



TypeError: can’t dup Symbol

Why leave in the public api of a class a method which shouldn’t be used?
Shouldn’t remove_method be called for :dup of Symbol?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs