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 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!