Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions core/string.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -83,6 +85,8 @@ class String < Object

# TODO: Symbol
# def to_sym: () -> Symbol
#
# alias intern to_sym

def tr: (String pattern, String replace) -> String

Expand Down
2 changes: 2 additions & 0 deletions test/string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
'abcdef'[3] = 'D'
'abcdef'[3, 3] = 'defghi'

'abcdef'.b

"abcdef\n".chomp

"abcdef\n".chomp!
Expand Down