summaryrefslogtreecommitdiff
path: root/test/strscan
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/strscan] Mask out this test on JRuby/WindowsCharles Oliver Nutter2023-02-211-1/+4
| | | | | | | | See https://github.com/jruby/jruby/issues/7644 for the root issue, which will require fixes to JRuby's regular expression engine, JOni. https://github.com/ruby/strscan/commit/29a65abff2
* [ruby/strscan] test: Run test more with fixed anchor modeSutou Kouhei2023-02-211-19/+25
| | | | | | (https://github.com/ruby/strscan/pull/60) fix https://github.com/ruby/strscan/pull/56
* [ruby/strscan] Add test case to `test_string`OKURA Masafumi2023-02-211-2/+4
| | | | | | | (https://github.com/ruby/strscan/pull/58) `string` returns the original string after `scan` is called. Current test doesn't check this behavior and now it's covered.
* Merge strscan-3.0.5Hiroshi SHIBATA2022-12-092-1/+34
|
* [ruby/strscan] Fix segmentation fault of `StringScanner#charpos` when ↵Kenichi Kamiya2021-05-061-0/+17
| | | | | | `String#byteslice` returns non string value [Bug #17756] (#20) https://github.com/ruby/strscan/commit/92961cde2b
* Import from https://github.com/ruby/strscan/pull/19Hiroshi SHIBATA2021-05-061-1/+1
| | | | | | * Use Gemfile instead of Gem::Specification#add_development_dependency. * Use pend instead of skip for test-unit.
* [strscan] Make strscan Ractor safe (#17)Kenta Murata2020-12-181-0/+28
| | | | | | | | * Make strscan Ractor safe * Add test-unit in the development dependencies https://github.com/ruby/strscan/commit/3c93c2bebe
* Deprecate taint/trust and related methods, and make the methods no-opsJeremy Evans2019-11-181-81/+0
| | | | | | This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby.
* Import StringScanner 1.0.3 (#2553)Sutou Kouhei2019-10-141-70/+170
|
* strscan.c: add MatchData-like methodsnobu2017-11-291-0/+22
| | | | | | | | | * ext/strscan/strscan.c: added `size`, `captures` and `values_at` to StringScanner, shorthands of accessing the matched data. based on the patch by apeiros (Stefan Rusterholz) at [ruby-core:20412]. [Feature #836] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* strscan.c: fix segfault in arefnobu2017-07-211-0/+10
| | | | | | | | * ext/strscan/strscan.c (strscan_aref): fix segfault after get_byte or getch which do not apply regexp. [ruby-core:82116] [Bug #13759] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* {ext,test}/strscan: Specify frozen_string_literal: true.kazu2017-02-061-29/+29
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* strscan.c: encoding in messagesnobu2014-08-031-0/+1
| | | | | | | * ext/strscan/strscan.c (strscan_aref): preserve argument encoding in error messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test: get rid of warnings.usa2014-03-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/strscan/strscan.c (strscan_aref): raise error if givennaruse2013-05-241-4/+7
| | | | | | name reference is not found. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/strscan/strscan.c (strscan_aref): support named captures.naruse2013-05-211-0/+11
| | | | | | patched by Konstantin Haase [ruby-core:54664] [Feature #8343] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added #charpos for multibyte string position.ryan2012-11-281-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* avoid method redefinition.akr2010-02-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/strscan/strscan.c (strscan_set_string): set string should not benobu2009-08-261-0/+20
| | | | | | | | | dupped or frozen, because freezing it causes #concat method failure, and unnecessary to dup without freezing. a patch from Aaron Patterson at [ruby-core:25145]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/strscan/strscan.c (Init_strscan): remove obsoletematz2009-06-171-2/+1
| | | | | | matchedsize method, use matched_size instead. [ruby-dev:38591] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test: assert_raises has been deprecated since a long time ago.nobu2008-09-241-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/stringio/test_stringio.rb: add tests to achieve over 95% testmame2008-06-051-0/+123
| | | | | | | | | coverage of stringio. * test/strscan/test_stringscanner.rb: ditto for strscan. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_prepare_re): made non static with small refactoring.matz2008-05-121-1/+1
| | | | | | | * ext/strscan/strscan.c (strscan_do_scan): should adjust encoding before regex searching. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test.akr2007-12-281-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/strscan/strscan.c (str_new): new function for allocate an stringakr2007-12-281-4/+9
| | | | | | | | | | | | with encoding propagation. (extract_range): use str_new. (extract_beg_len): ditto. (strscan_peek): ditto. (strscan_rest): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/socket/test_socket.rb: update not to use 1.8 assignment tomatz2007-11-141-29/+10
| | | | | | | | | | external local variable in the block parameters. [ruby-dev:32251] * test/strscan/test_stringscanner.rb: avoid $KCODE, and use String#force_encoding(). [ruby-dev:32251] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/strscan/strscan.c (strscan_do_scan): StringScanner.new("").scan(//) ↵aamine2006-07-261-0/+10
| | | | | | should return "". [ruby-Bugs:4361] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/strscan/strscan.c: new method StringScanner#initialize_copy to allow ↵aamine2004-03-051-0/+61
| | | | | | | | | #dup and #clone. * test/strscan/test_strscan.rb: test StringScanner#dup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/*: should not depend on $KCODE.nahi2004-02-181-16/+28
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* introduce some new methodsaamine2003-12-161-7/+86
| | | | | | | | | | | * ext/strscan/strscan.c: new method StringScanner#beginning_of_line? (alias #bol?) * ext/strscan/strscan.c: new method StringScanner#concat and #<<. * ext/strscan/strscan.c: StringScanner#new(str) does not duplicate nor freeze STR (allow destructive modification). * test/strscan/test_stringscanner.rb: test new methods above. * test/strscan/test_stringscanner.rb: test destructive string modification. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/strscan/test_stringscanner.rb: require test/unit.aamine2003-09-171-8/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/strscan/test_stringscanner.rb: new file.aamine2003-09-171-0/+403
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e