File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33## Unreleased
44
5- - Enable file each message method and message iterator each method
6- flag iterator each method to run without given block.
5+ - Enable file each message method, message iterator each method flag
6+ iterator each method, and message each sticky flag method to run
7+ without given block.
78
89## CRuby and mruby version 0.3.0 - 2026-03-17
910
Original file line number Diff line number Diff line change @@ -82,7 +82,12 @@ def file_positions
8282 positions
8383 end
8484
85- def each_sticky_flag # yields: flag
85+ # call-seq:
86+ # each_sticky_flag { |flag| ... }
87+ # each_sticky_flag -> Enumerator
88+ def each_sticky_flag
89+ block_given? or return enum_for ( __method__ )
90+
8691 iter = sticky_flag_iterator
8792 while true
8893 begin
Original file line number Diff line number Diff line change 1+ #, fuzzy , no-wrap
2+ msgid "msgid1"
3+ msgstr "msgstr1"
Original file line number Diff line number Diff line change 8787 assert_true message . sticky_flag? ( 'no-wrap' )
8888 true
8989end
90+
91+ assert 'each flag' do
92+ path = File . expand_path ( File . join ( __FILE__ , "../../test.cruby/resources/flag.po" ) )
93+ iterator = GettextPO ::File . read ( path ) . message_iterator
94+ message = iterator . next
95+ assert_equal [ 'no-wrap' ] , message . each_sticky_flag . to_a
96+
97+ true
98+ end
You can’t perform that action at this time.
0 commit comments