From 3780626e4cbe662da210e941daad79fc37d0eff6 Mon Sep 17 00:00:00 2001 From: Joel Drapper Date: Sun, 8 Dec 2024 13:23:56 +0000 Subject: [PATCH] Alias `initialize_copy` to `replace` Closes #178 --- lib/literal/array.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/literal/array.rb b/lib/literal/array.rb index 1595225..382ecf6 100644 --- a/lib/literal/array.rb +++ b/lib/literal/array.rb @@ -446,6 +446,8 @@ def replace(value) self end + alias_method :initialize_copy, :replace + def rotate(...) __with__(@__value__.rotate(...)) end