From 075f71b1844da1b7ea3fa5145f2bf45c3eb3417d Mon Sep 17 00:00:00 2001 From: tufusa Date: Tue, 13 Jan 2026 13:41:58 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20`String#b`=20=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/string.rbs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/string.rbs b/core/string.rbs index e020147..fadf996 100644 --- a/core/string.rbs +++ b/core/string.rbs @@ -42,6 +42,8 @@ class String < Object | (Integer nth, Integer len, String val) -> String # | (Range range, String val) -> String + def b: () -> String + def chomp: () -> String def chomp!: () -> self? @@ -83,6 +85,8 @@ class String < Object # TODO: Symbol # def to_sym: () -> Symbol + # + # alias intern to_sym def tr: (String pattern, String replace) -> String From 7aba79151924f26e7eeaa1594a964fb3053f2edb Mon Sep 17 00:00:00 2001 From: tufusa Date: Tue, 13 Jan 2026 13:44:54 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20`String#b`=20=E3=81=AE=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/string.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/string.rb b/test/string.rb index 50c81d8..ff41d9d 100644 --- a/test/string.rb +++ b/test/string.rb @@ -46,6 +46,8 @@ 'abcdef'[3] = 'D' 'abcdef'[3, 3] = 'defghi' +'abcdef'.b + "abcdef\n".chomp "abcdef\n".chomp!