From: Kouhei S. <nu...@co...> - 2017-08-06 07:15:46
|
Kouhei Sutou 2017-08-06 16:15:02 +0900 (Sun, 06 Aug 2017) New Revision: 2528ecfe0800e5d9910ceec38077a7591f66afa1 https://github.com/ruby-gnome2/ruby-gnome2/commit/2528ecfe0800e5d9910ceec38077a7591f66afa1 Message: vte3: fix length unit It's byte not the number of characters. Modified files: vte3/lib/vte3/regex.rb Modified: vte3/lib/vte3/regex.rb (+2 -2) =================================================================== --- vte3/lib/vte3/regex.rb 2017-08-06 16:14:30 +0900 (9ba8102b5) +++ vte3/lib/vte3/regex.rb 2017-08-06 16:15:02 +0900 (115db3bd1) @@ -21,9 +21,9 @@ module Vte def initialize(pattern, compile_flags, options) flags = parse_compile_flags(compile_flags) if options[:for_match] - initialize_new_for_match(pattern, pattern.length, flags) + initialize_new_for_match(pattern, pattern.bytesize, flags) elsif options[:for_search] - initialize_new_for_search(pattern, pattern.length, flags) + initialize_new_for_search(pattern, pattern.bytesize, flags) else raise(ArgumentError, "must specify usage :for_match or :for_search : #{options.inspect}") |