Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Array オブジェクトに関する新しい要件があります。そのため、組み込みの Array クラスに独自のメソッドを追加する必要があります。
新しいメソッドを追加して、作成する Array オブジェクトが何であれ、インスタンス メソッドも持つようにするにはどうすればよいですか?
Ruby オープン クラスを使用します。
class Array def mymethod #implementation end end