Skip to content

Commit fad5411

Browse files
committed
Build invariant regexp just once
1 parent 5164da4 commit fad5411

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/ffi/io/console/stty_console.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def noecho
7474
UBUNTU = 'rows (?<rows>\d+); columns (?<columns>\d+)'
7575

7676
def winsize
77-
match = _io_console_stty('-a').match(/#{IEEE_STD_1003_2}|#{UBUNTU}/)
77+
match = _io_console_stty('-a').match(/#{IEEE_STD_1003_2}|#{UBUNTU}/o)
7878
[match[:rows].to_i, match[:columns].to_i]
7979
end
8080

0 commit comments

Comments
 (0)