From: "pyromaniac (Arkadiy Zabazhanov) via ruby-core" Date: 2023-05-04T03:24:02+00:00 Subject: [ruby-core:113401] [Ruby master Feature#19015] Language extension by a heredoc Issue #19015 has been updated by pyromaniac (Arkadiy Zabazhanov). Hey folks. I'm actually wondering, why don't support Elixir-like sigils in Ruby? We have a ton of them already: `%w[]`, `%r//`, so why don't just add a support for custom ones? I'm, for once, time of writing `Date.new` or `Time.parse`, I'd like to have it `%D[2023-05-05]` or Money gem can introduce something like `%M[100 USD]` instead of the long `Money.from_amount(100, "USD")` version. ---------------------------------------- Feature #19015: Language extension by a heredoc https://bugs.ruby-lang.org/issues/19015#change-102972 * Author: ko1 (Koichi Sasada) * Status: Open * Priority: Normal ---------------------------------------- This propose new heredoc extension with `<Hello <%= name %> erb puts html #=>
Hello ko1
``` ## Background / considerations * Sometimes we write Ruby syntax string with `<