• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Ruby GTK3移行後のメインリポジトリ


Commit MetaInfo

修訂42eb7713b9711e468de385c55048835f2a975c41 (tree)
時間2015-11-08 15:08:58
作者Shyouzou Sugitani <shy@user...>
CommiterShyouzou Sugitani

Log Message

misc fixes

Change Summary

差異

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
1+Sun November 8 2015 Shyouzou Sugitani <shy@users.osdn.me>
2+ * Ruby移行以降の修正で漏れがあったもの対応.
3+
14 Tue November 3 2015 Shyouzou Sugitani <shy@users.osdn.me>
25 * Ruby移行以降の修正で漏れがあったもの対応.
36
--- a/lib/ninix/dll/aya.rb
+++ b/lib/ninix/dll/aya.rb
@@ -558,7 +558,7 @@ module Aya
558558 "Value: " + result.to_s + "\r\n\r\n".encode('CP932', :invalid => :replace, :undef => :replace)
559559 return result
560560 else
561- return result.encode('CP932', :invalid => :replace, :undef => :replac)
561+ return result.encode('CP932', :invalid => :replace, :undef => :replace)
562562 end
563563 end
564564 end
--- a/lib/ninix/dll/bln.rb
+++ b/lib/ninix/dll/bln.rb
@@ -101,7 +101,7 @@ module Bln
101101 for name in @blns.keys
102102 data, bln = @blns[name]
103103 for bln_id in bln.keys
104- if bln[bln_id]
104+ if bln[bln_id] != nil
105105 bln[bln_id].destroy()
106106 bln.delete(bln_id)
107107 end
@@ -117,7 +117,7 @@ module Bln
117117 for name in @blns.keys
118118 data, bln = @blns[name]
119119 for bln_id in bln.keys
120- if bln[bln_id]
120+ if bln[bln_id] != nil
121121 bln[bln_id].reset_scale()
122122 end
123123 end
@@ -448,7 +448,7 @@ module Bln
448448 @processed_text = ''
449449 @text = ''
450450 @script_wait = nil
451- @quick_session = 0
451+ @quick_session = false
452452 @script_parser = Script::Parser.new(:error => 'loose')
453453 begin
454454 @processed_script = @script_parser.parse(@script)
@@ -548,14 +548,14 @@ module Bln
548548 x = left + ((scrn_w - w) / 2).to_i
549549 y = top + scrn_h - h
550550 elsif @position == 'sakura'
551- if @direction # right
551+ if @direction == 1 # right
552552 x = s0_x + s0_w
553553 else
554554 x = s0_x - w
555555 end
556556 y = s0_y
557557 elsif @position == 'kero'
558- if @direction # right
558+ if @direction == 1 # right
559559 x = s1_x + s1_w
560560 else
561561 x = s1_x - w
@@ -587,7 +587,7 @@ module Bln
587587 @processed_text = ''
588588 @text = ''
589589 @script_wait = nil
590- @quick_session = 0
590+ @quick_session = false
591591 begin
592592 @processed_script = @script_parser.parse(@script)
593593 rescue Script::ParserError => e
@@ -682,7 +682,7 @@ module Bln
682682 end
683683
684684 def do_idle_tasks
685- if not @window
685+ if @window == nil
686686 return nil
687687 end
688688 s0_shown = get_sakura_status('SurfaceSakura_Shown')
@@ -710,7 +710,7 @@ module Bln
710710 (@position == 'kero' and not s1_shown) or \
711711 (@position == 'sakurab' and not b0_shown) or \
712712 (@position == 'kerob' and not b1_shown) or \
713- (@nooverlap and not @talking and sakura_talking)
713+ (@nooverlap == 1 and not @talking and sakura_talking)
714714 destroy()
715715 return nil
716716 end
@@ -723,21 +723,21 @@ module Bln
723723 end
724724 end
725725 if @visible
726- if @life_time
726+ if @life_time != nil
727727 if Time.now - @start_time >= @life_time * 0.001 and \
728728 not (not @processed_script.empty? or not @processed_text.empty?)
729729 destroy()
730730 return nil
731731 end
732732 end
733- if @action
733+ if @action != nil
734734 if @action['method'] == 'sinwave'
735735 offset = @action['ref1'] \
736736 * Math.sin(2.0 * Math::PI \
737737 * (((Time.now - \
738738 @start_time) * 1000).to_i \
739739 % @action['ref2']).to_f / @action['ref2'])
740- if @action['ref0']
740+ if @action['ref0'] == 1
741741 @action_y = offset.to_i
742742 else
743743 @action_x = offset.to_i
@@ -783,7 +783,7 @@ module Bln
783783 cr.set_operator(Cairo::OPERATOR_SOURCE)
784784 cr.paint()
785785 cr.set_operator(Cairo::OPERATOR_OVER) # restore default
786- if @layout
786+ if @layout != nil
787787 cr.set_source_rgb(*@fontcolor)
788788 cr.move_to(@left.to_i, @top.to_i)
789789 cr.show_pango_layout(@layout)
@@ -821,7 +821,7 @@ module Bln
821821 @text = [@text, "\n"].join("")
822822 draw_text(@text)
823823 elsif name == '\w'
824- if args
824+ if args != nil
825825 begin
826826 amount = Integer(args[0]) * 0.05 - 0.01
827827 rescue
@@ -834,7 +834,7 @@ module Bln
834834 @script_wait = Time.now + amount
835835 end
836836 elsif name == '\b'
837- if args
837+ if args != nil
838838 begin
839839 amount = Integer(args[0])
840840 rescue
@@ -905,7 +905,7 @@ module Bln
905905 @y_root != nil
906906 x_delta = (event.x_root - @x_root).to_i
907907 y_delta = (event.y_root - @y_root).to_i
908- if event.state & Gdk::ModifierType::BUTTON1_MASK
908+ if event.state & Gdk::ModifierType::BUTTON1_MASK != 0
909909 if @dragmove_horizontal
910910 @x += x_delta
911911 end
@@ -938,11 +938,11 @@ module Bln
938938
939939 def destroy
940940 @visible = false
941- if @window
941+ if @window != nil
942942 @window.destroy()
943943 @window = nil
944944 end
945- if @timeout_id
945+ if @timeout_id != nil
946946 GLib::Source.remove(@timeout_id)
947947 @timeout_id = nil
948948 end
--- a/lib/ninix/dll/misaka.rb
+++ b/lib/ninix/dll/misaka.rb
@@ -85,7 +85,7 @@ module Misaka
8585 open(path) do |f|
8686 while true
8787 line = f.gets
88- if not line
88+ if line == nil
8989 break
9090 end
9191 line = line.strip()
@@ -99,7 +99,7 @@ module Misaka
9999 end
100100 while true
101101 line = f.gets
102- if not line
102+ if line == nil
103103 Misaka.syntax_error('unexpected end of file', path)
104104 end
105105 line = line.strip()
@@ -198,7 +198,7 @@ module Misaka
198198 while pos < end_
199199 if column == 0
200200 match = Re_comment.match(data[pos..-1])
201- if match
201+ if match != nil
202202 column = column + match[0].length
203203 pos += match.end(0)
204204 next
@@ -207,7 +207,7 @@ module Misaka
207207 break_flag = false
208208 for token, pattern in Patterns
209209 match = pattern.match(data[pos..-1])
210- if match
210+ if match != nil
211211 lexeme = match[0]
212212 if token == TOKEN_TEXT and \
213213 lexeme.start_with?('"') and lexeme.end_with?('"')
@@ -295,7 +295,7 @@ module Misaka
295295 end
296296
297297 def skip_line
298- while @buffer
298+ while not @buffer.empty?
299299 token, lexeme = pop()
300300 if token == TOKEN_NEWLINE
301301 break
@@ -394,7 +394,7 @@ module Misaka
394394 break
395395 end
396396 end
397- if not buf
397+ if buf.empty?
398398 Misaka.syntax_error('null identifier',
399399 @path, @lexer.get_position())
400400 end
@@ -446,7 +446,7 @@ module Misaka
446446 break
447447 end
448448 sentence = get_sentence()
449- if not sentence
449+ if sentence == nil
450450 next
451451 end
452452 sentences << sentence
@@ -536,10 +536,10 @@ module Misaka
536536 end
537537 end
538538 # strip whitespace at the beginning and/or end of line
539- if buf and is_whitespace(buf[0])
539+ if not buf.empty? and is_whitespace(buf[0])
540540 buf.delete_at(0)
541541 end
542- if buf and is_whitespace(buf[-1])
542+ if not buf.empty? and is_whitespace(buf[-1])
543543 buf.delete_at(-1)
544544 end
545545 return buf
@@ -568,10 +568,10 @@ module Misaka
568568 end
569569 end
570570 # strip whitespace at the beginning and/or end of line
571- if buf and is_whitespace(buf[0])
571+ if not buf.empty? and is_whitespace(buf[0])
572572 buf.delete_at(0)
573573 end
574- if buf and is_whitespace(buf[-1])
574+ if not buf.empty? and is_whitespace(buf[-1])
575575 buf.delete_at(-1)
576576 end
577577 return buf
@@ -748,10 +748,10 @@ module Misaka
748748 end
749749 end
750750 # strip whitespace at the beginning and/or end of line
751- if buf and is_whitespace(buf[0])
751+ if not buf.empty? and is_whitespace(buf[0])
752752 buf.delete_at(0)
753753 end
754- if buf and is_whitespace(buf[-1])
754+ if not buf.empty? and is_whitespace(buf[-1])
755755 buf.delete_at(-1)
756756 end
757757 return buf
@@ -1094,7 +1094,7 @@ module Misaka
10941094 end
10951095
10961096 def get
1097- if not @list
1097+ if @list.empty?
10981098 return nil
10991099 end
11001100 return @list.sample
@@ -1114,7 +1114,7 @@ module Misaka
11141114 end
11151115
11161116 def get
1117- if not @list
1117+ if @list.empty?
11181118 return nil
11191119 end
11201120 if @indexes.empty?
@@ -1136,7 +1136,7 @@ module Misaka
11361136 end
11371137
11381138 def get
1139- if not @list
1139+ if @list.empty?
11401140 return nil
11411141 end
11421142 if @indexes.empty?
@@ -1164,7 +1164,7 @@ module Misaka
11641164 end
11651165
11661166 def pop
1167- if not @list
1167+ if @list.empty?
11681168 return nil
11691169 end
11701170 i = Array(0..@list.length-1).sample
@@ -1181,7 +1181,7 @@ module Misaka
11811181 buf << i
11821182 end
11831183 end
1184- if not buf
1184+ if buf.empty?
11851185 return nil
11861186 end
11871187 i = buf.sample
@@ -1351,7 +1351,7 @@ module Misaka
13511351 variables = []
13521352 constants = []
13531353 for name, parameters, sentences in dic
1354- if not sentences
1354+ if sentences == nil
13551355 next
13561356 elsif name == '$_Variable'
13571357 variables |= sentences
@@ -1407,7 +1407,7 @@ module Misaka
14071407 'misaka.rb: malformed database (ignored)')
14081408 break
14091409 end
1410- if not line
1410+ if line == nil
14111411 break
14121412 end
14131413 header = strip_newline(line).split(nil, -1)
@@ -1482,7 +1482,7 @@ module Misaka
14821482 def request(req_string)
14831483 header = req_string.split(/\r?\n/, 0)
14841484 line = header.shift
1485- if line
1485+ if line != nil
14861486 line = line.force_encoding(@charset).encode('utf-8', :invalid => :replace, :undef => :replace).strip()
14871487 req_list = line.split(nil, -1)
14881488 if req_list.length >= 2
@@ -1524,7 +1524,7 @@ module Misaka
15241524 refs = []
15251525 while true
15261526 ref = get_ref(n)
1527- if ref
1527+ if ref != nil
15281528 refs << ref
15291529 else
15301530 break
@@ -1580,7 +1580,7 @@ module Misaka
15801580 script.encode(@charset, :invalid => :replace, :undef => :replace),
15811581 "\r\n"].join('')
15821582 to = eval_variable([[NODE_TEXT, '$to']])
1583- if to
1583+ if to != nil
15841584 @variable.delete('$to')
15851585 response = [response,
15861586 "Reference0: ",
@@ -1730,7 +1730,7 @@ module Misaka
17301730 elsif name == '$lastsentence'
17311731 result = @communicate[1]
17321732 elsif name == '$otherghostlist'
1733- if @otherghost
1733+ if not @otherghost.empty?
17341734 ghost = @otherghost.sample
17351735 result = ghost[0]
17361736 else
@@ -2023,7 +2023,7 @@ module Misaka
20232023 end
20242024
20252025 def exec_choice(args)
2026- if not args
2026+ if args.empty?
20272027 return ''
20282028 end
20292029 return expand_args(args.sample)
@@ -2057,7 +2057,7 @@ module Misaka
20572057 namelist << name
20582058 end
20592059 end
2060- if not namelist
2060+ if namelist.empty?
20612061 return ''
20622062 end
20632063 keylist = []
@@ -2073,7 +2073,7 @@ module Misaka
20732073 keylist << key
20742074 end
20752075 end
2076- if not keylist
2076+ if keylist.empty?
20772077 return ''
20782078 end
20792079 return eval_variable([[NODE_TEXT, keylist.sample]])
@@ -2087,7 +2087,7 @@ module Misaka
20872087 end
20882088
20892089 def exec_backup(args)
2090- if not args
2090+ if args.empty?
20912091 save_database()
20922092 end
20932093 return ''
@@ -2192,7 +2192,7 @@ module Misaka
21922192 return ''
21932193 end
21942194 buf = expand_args(args[0])
2195- if not buf
2195+ if buf.empty?
21962196 return ''
21972197 else
21982198 return buf[0]
@@ -2204,7 +2204,7 @@ module Misaka
22042204 return ''
22052205 end
22062206 buf = expand_args(args[0])
2207- if not buf
2207+ if buf.empty?
22082208 return ''
22092209 else
22102210 return buf[-1]
@@ -2262,7 +2262,7 @@ module Misaka
22622262 end
22632263 buf0 = expand_args(args[0])
22642264 buf1 = expand_args(args[1])
2265- if buf0 and buf1 and buf0[-1] == buf1[0]
2265+ if not buf0.empty? and not buf1.empty? and buf0[-1] == buf1[0]
22662266 return 'true'
22672267 else
22682268 return 'false'
@@ -2272,7 +2272,7 @@ module Misaka
22722272 def exec_append(args)
22732273 if args.length == 2
22742274 name = expand_args(args[0])
2275- if name and name.start_with?('$')
2275+ if not name.empty? and name.start_with?('$')
22762276 if @variable.include?(name)
22772277 value_type, value = @variable[name]
22782278 else
@@ -2321,11 +2321,11 @@ module Misaka
23212321 return ''
23222322 end
23232323 src_name = expand_args(args[0])
2324- if not (src_name and src_name.start_with?('$'))
2324+ if not (not src_name.empty? and src_name.start_with?('$'))
23252325 return ''
23262326 end
23272327 new_name = expand_args(args[1])
2328- if not (new_name and new_name.start_with?('$'))
2328+ if not (not new_name.empty? and new_name.start_with?('$'))
23292329 return ''
23302330 end
23312331 source = nil
@@ -2390,7 +2390,7 @@ module Misaka
23902390 end
23912391
23922392 def exec_insentence(args)
2393- if not args
2393+ if args.empty?
23942394 return ''
23952395 end
23962396 s = expand_args(args[0])
@@ -2495,7 +2495,7 @@ module Misaka
24952495 end
24962496
24972497 def exec_inlastsentence(args)
2498- if not args
2498+ if args.empty?
24992499 return ''
25002500 end
25012501 s = @communicate[1]
@@ -2537,7 +2537,7 @@ module Misaka
25372537 end
25382538 for line in header
25392539 line = line.force_encoding(@charset).encode('utf-8', :invalid => :replace, :undef => :replace).strip()
2540- if not line
2540+ if line.empty?
25412541 next
25422542 end
25432543 if not line.include?(':')
@@ -2546,7 +2546,7 @@ module Misaka
25462546 key, value = line.split(':', 2)
25472547 key.strip!
25482548 value.strip!
2549- if key
2549+ if not key.empty?
25502550 saori_header << key
25512551 saori_value[key] = value
25522552 end
@@ -2560,12 +2560,12 @@ module Misaka
25602560 end
25612561
25622562 def load_saori(args)
2563- if not args
2563+ if args.empty?
25642564 return ''
25652565 end
25662566 result = @saori_library.load(expand_args(args[0]),
25672567 @misaka_dir)
2568- if not result
2568+ if result == 0
25692569 return ''
25702570 else
25712571 result.to_s
@@ -2573,11 +2573,11 @@ module Misaka
25732573 end
25742574
25752575 def unload_saori(args)
2576- if not args
2576+ if args.empty?
25772577 return ''
25782578 end
25792579 result = @saori_library.unload(expand_args(args[0]))
2580- if not result
2580+ if result == 0
25812581 return ''
25822582 else
25832583 return result.to_s
@@ -2587,7 +2587,7 @@ module Misaka
25872587 def exec_isghostexists(args)
25882588 result = 'false'
25892589 if args.length != 1
2590- if @otherghost.length
2590+ if @otherghost.length > 0
25912591 result = 'true'
25922592 @variable['$to'] = [TYPE_SCHOLAR,
25932593 @otherghost.sample[0]]
@@ -2654,7 +2654,7 @@ module Misaka
26542654 top_dir = File.join(top_dir, head)
26552655 if not @saori_list.include?(name)
26562656 module_ = @saori.request(name)
2657- if module_
2657+ if module_ != nil
26582658 @saori_list[name] = module_
26592659 end
26602660 end
@@ -2665,7 +2665,7 @@ module Misaka
26652665 end
26662666
26672667 def unload(name=nil)
2668- if name
2668+ if name != nil
26692669 name = File.split(name.gsub('\\', '/'))[-1] # XXX: don't encode here
26702670 if @saori_list.include?(name)
26712671 @saori_list[name].unload()
@@ -2682,7 +2682,7 @@ module Misaka
26822682 def request(name, req)
26832683 result = '' # FIXME
26842684 name = File.split(name.gsub('\\', '/'))[-1] # XXX: don't encode here
2685- if name and @saori_list.include?(name)
2685+ if not name.empty? and @saori_list.include?(name)
26862686 result = @saori_list[name].request(req)
26872687 end
26882688 return result
--- a/lib/ninix/menu.rb
+++ b/lib/ninix/menu.rb
@@ -183,7 +183,7 @@ module Menu
183183 set_stylecontext(i, *a)
184184 end
185185 submenu = item.submenu
186- if submenu
186+ if submenu != nil
187187 submenu.signal_connect('realize') do |i, *a|
188188 set_stylecontext(i, *a)
189189 end
@@ -293,7 +293,7 @@ module Menu
293293 for _ in @__mayuna_menu.length..index
294294 @__mayuna_menu << nil
295295 end
296- if mayuna_menu[side]
296+ if mayuna_menu[side] != nil
297297 @__mayuna_menu[index] = Gtk::Menu.new()
298298 item = Gtk::TearoffMenuItem.new()
299299 item.show()
@@ -363,14 +363,14 @@ module Menu
363363 else
364364 name_list = @__ui[key][0][side]
365365 end
366- if name_list # caption
366+ if not name_list.empty? # caption
367367 for name in name_list
368368 caption = @parent.handle_request('GET', 'getstring', name)
369- if caption
369+ if caption != nil and not caption.empty?
370370 break
371371 end
372372 end
373- if caption
373+ if caption != nil and not caption.empty?
374374 caption = __modify_shortcut(caption)
375375 if caption == __cut_mnemonic(caption)
376376 caption = [caption, @__ui[key][1]].join('')
@@ -384,7 +384,7 @@ module Menu
384384 else
385385 name_list = @__ui[key][2][side]
386386 end
387- if name_list and !name_list.empty? # visible
387+ if name_list != nil and not name_list.empty? # visible
388388 for name in name_list
389389 visible = @parent.handle_request('GET', 'getstring', name)
390390 if visible != nil
@@ -407,7 +407,7 @@ module Menu
407407 for key in @__menu_list.keys
408408 item = @ui_manager.get_widget(['/popup/', key].join(''))
409409 submenu = item.submenu
410- if submenu
410+ if submenu != nil
411411 submenu.unrealize()
412412 end
413413 end
@@ -447,7 +447,7 @@ module Menu
447447 for key in @__menu_list.keys
448448 item = @ui_manager.get_widget(['/popup/', key].join(''))
449449 visible = @__menu_list[key]['visible']
450- if item
450+ if item != nil
451451 if visible
452452 item.show()
453453 else
@@ -463,7 +463,7 @@ module Menu
463463 #assert @__menu_list.include?(name)
464464 #assert isinstance(caption, str)
465465 item = @ui_manager.get_widget(['/popup/', name].join(''))
466- if item
466+ if item != nil
467467 label = item.get_children()[0]
468468 label.set_text_with_mnemonic(caption)
469469 end
@@ -479,7 +479,7 @@ module Menu
479479 if side >= 1
480480 __set_visible('Portal', false)
481481 else
482- if portal
482+ if portal != nil and not portal.empty?
483483 menu = Gtk::Menu.new()
484484 portal_list = portal.split(2.chr, 0)
485485 for site in portal_list
@@ -503,7 +503,7 @@ module Menu
503503 'GET', 'get_prefix')
504504 filename = entry[2].downcase
505505 tail = File.extname(filename)
506- if not tail
506+ if tail.empty?
507507 for ext in ['.png', '.jpg', '.gif']
508508 filename = [filename, ext].join('')
509509 banner = File.join(
@@ -555,7 +555,7 @@ module Menu
555555 end
556556
557557 def __set_recommend_menu(recommend)
558- if recommend
558+ if recommend != nil and not recommend.empty?
559559 menu = Gtk::Menu.new()
560560 recommend_list = recommend.split(2.chr, 0)
561561 for site in recommend_list
@@ -578,7 +578,7 @@ module Menu
578578 base_path = @parent.handle_request('GET', 'get_prefix')
579579 filename = entry[2].downcase
580580 tail = File.extname(filename)
581- if not tail
581+ if tail.empty?
582582 for ext in ['.png', '.jpg', '.gif']
583583 filename = [filename, ext].join('')
584584 banner = File.join(
@@ -760,7 +760,7 @@ module Menu
760760 ghost_menu = Gtk::Menu.new()
761761 for items in @parent.handle_request('GET', 'get_ghost_menus')
762762 item = items[path]
763- if item.parent
763+ if item.parent != nil
764764 item.reparent(ghost_menu)
765765 else
766766 ghost_menu << item
@@ -789,7 +789,7 @@ module Menu
789789 def create_meme_menu(menuitem)
790790 menu = Gtk::Menu.new()
791791 for item in menuitem.values()
792- if item.parent
792+ if item.parent != nil
793793 item.reparent(menu)
794794 else
795795 menu << item
--- a/lib/ninix/seriko.rb
+++ b/lib/ninix/seriko.rb
@@ -626,7 +626,7 @@ module Seriko
626626 else
627627 return [] ## should not reach here
628628 end
629- if not match
629+ if match == nil
630630 next
631631 end
632632 if version == 1 and not re_seriko_interval_value.match(value)
@@ -691,7 +691,7 @@ module Seriko
691691 else
692692 match = re_seriko2_pattern.match(pattern)
693693 end
694- if not match
694+ if match == nil
695695 raise ('unsupported pattern: ' + pattern)
696696 end
697697 if version == 1
@@ -700,12 +700,12 @@ module Seriko
700700 method = match[3]
701701 else
702702 method = match[1]
703- if not match[2]
703+ if match[2] == nil
704704 surface = 0
705705 else
706706 surface = match[2].to_i.to_s
707707 end
708- if not match[3]
708+ if match[3] == nil
709709 interval = 0
710710 else
711711 interval = match[3].to_i.abs
@@ -745,12 +745,12 @@ module Seriko
745745 x = 0
746746 y = 0
747747 else
748- if not match[4]
748+ if match[4] == nil
749749 x = 0
750750 else
751751 x = match[4].to_i
752752 end
753- if not match[5]
753+ if match[5] == nil
754754 y = 0
755755 else
756756 y = match[5].to_i
@@ -802,17 +802,17 @@ module Seriko
802802 else
803803 match1 = re_mayuna_interval.match(key)
804804 match2 = re_mayuna2_interval.match(key)
805- if match1
805+ if match1 != nil
806806 version = 1
807807 match = match1
808- elsif match2
808+ elsif match2 != nil
809809 version = 2
810810 match = match2
811811 else
812812 next
813813 end
814814 end
815- if not match
815+ if match == nil
816816 next
817817 end
818818 if version == 1 and not re_mayuna_interval_value.match(value)
@@ -846,7 +846,7 @@ module Seriko
846846 else
847847 match = re_mayuna2_pattern.match(pattern)
848848 end
849- if not match
849+ if match == nil
850850 raise ('unsupported pattern: ' + pattern)
851851 end
852852 if version == 1
@@ -865,12 +865,12 @@ module Seriko
865865 x = 0
866866 y = 0
867867 else
868- if not match[4]
868+ if match[4] == nil
869869 x = 0
870870 else
871871 x = match[4].to_i
872872 end
873- if not match[5]
873+ if match[5] == nil
874874 y = 0
875875 else
876876 y = match[5].to_i