Ruby GTK3移行後のメインリポジトリ
リビジョン | ce54613902b9098a645cc89d851c866f1276e98d (tree) |
---|---|
日時 | 2015-05-21 22:15:59 |
作者 | Shyouzou Sugitani <shy@user...> |
コミッター | Shyouzou Sugitani |
assorted fixes(23)
@@ -2810,7 +2810,7 @@ module Sakura | ||
2810 | 2810 | elsif node[0] == Script::SCRIPT_TEXT |
2811 | 2811 | text = expand_meta(node[1]) |
2812 | 2812 | if @anchor |
2813 | - @anchor[1] = ''.join([@anchor[1], text]) | |
2813 | + @anchor[1] = [@anchor[1], text].join('') | |
2814 | 2814 | end |
2815 | 2815 | script_speed = @parent.handle_request( |
2816 | 2816 | 'GET', 'get_preference', 'script_speed') |
@@ -2892,7 +2892,7 @@ module Sakura | ||
2892 | 2892 | left, top, scrn_w, scrn_h = Pix.get_workarea() |
2893 | 2893 | buf << scrn_h.to_s |
2894 | 2894 | elsif chunk[1] == '%et' |
2895 | - buf << '{0:d}万年'.format(@current_time[5]) | |
2895 | + buf << @current_time[5].to_s[-1] + '万年' | |
2896 | 2896 | elsif chunk[1] == '%wronghour' |
2897 | 2897 | wrongtime = Time.new.to_f + [-2, -1, 1, 2].sample * 3600 |
2898 | 2898 | buf << time.localtime(wrongtime)[3].to_s |
@@ -2912,12 +2912,12 @@ module Sakura | ||
2912 | 2912 | |
2913 | 2913 | ### SEND SSTP/1.3 ### |
2914 | 2914 | def _send_sstp_handle(data) |
2915 | - r, w, e = select.select([], [@sstp_handle], [], 0) | |
2915 | + r, w, e = IO.select([], [@sstp_handle], [], 0) | |
2916 | 2916 | if not w |
2917 | 2917 | return |
2918 | 2918 | end |
2919 | 2919 | begin |
2920 | - @sstp_handle.send(''.join([data, '\n'])) | |
2920 | + @sstp_handle.send([data, '\n'].join('')) | |
2921 | 2921 | rescue #except socket.error: |
2922 | 2922 | #pass |
2923 | 2923 | end |
@@ -2927,7 +2927,7 @@ module Sakura | ||
2927 | 2927 | if @sstp_handle == nil |
2928 | 2928 | return |
2929 | 2929 | end |
2930 | - _send_sstp_handle(''.join(['+', data])) | |
2930 | + _send_sstp_handle(['+', data].join('')) | |
2931 | 2931 | ##logging.debug('write_sstp_handle({0})'.format(repr(data))) |
2932 | 2932 | end |
2933 | 2933 |
@@ -2976,9 +2976,9 @@ module Sakura | ||
2976 | 2976 | homeurl = getstring('homeurl') |
2977 | 2977 | if homeurl.empty? |
2978 | 2978 | start_script( |
2979 | - ''.join(['\t\h\s[0]', | |
2980 | - _("I'm afraid I don't have Network Update yet."), | |
2981 | - '\e'])) | |
2979 | + ['\t\h\s[0]', | |
2980 | + _("I'm afraid I don't have Network Update yet."), | |
2981 | + '\e'].join('')) | |
2982 | 2982 | @balloon.hide_sstp_message() |
2983 | 2983 | return |
2984 | 2984 | end |