Mercurial > hgrepos > hgweb.cgi > after5
comparison after5.rb @ 30:af3f2175eddf draft
Expand Array to string.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 03 Apr 2012 16:23:45 +0900 |
parents | e7a01e561e28 |
children | aceb533dfa32 |
comparison
equal
deleted
inserted
replaced
29:e7a01e561e28 | 30:af3f2175eddf |
---|---|
3 # | 3 # |
4 # Associative Scheduling Table - after5 | 4 # Associative Scheduling Table - after5 |
5 # (C)2003, 2004, 2006, 2008, 2012 by HIROSE Yuuji [yuuji<at>gentei.org] | 5 # (C)2003, 2004, 2006, 2008, 2012 by HIROSE Yuuji [yuuji<at>gentei.org] |
6 # $Id: after5.rb,v 1.19 2012/04/01 11:52:25 yuuji Exp yuuji $ | 6 # $Id: after5.rb,v 1.19 2012/04/01 11:52:25 yuuji Exp yuuji $ |
7 # $HGid$ | 7 # $HGid$ |
8 # Last modified Tue Apr 3 15:05:40 2012 on firestorm | 8 # Last modified Tue Apr 3 16:23:09 2012 on firestorm |
9 # See http://www.gentei.org/~yuuji/software/after5/ | 9 # See http://www.gentei.org/~yuuji/software/after5/ |
10 # このスクリプトはEUCで保存してください。 | 10 # このスクリプトはEUCで保存してください。 |
11 | 11 |
12 require 'kconv' | 12 require 'kconv' |
13 require 'nkf' | 13 require 'nkf' |
779 date.untaint | 779 date.untaint |
780 f = File.join(ud, date) | 780 f = File.join(ud, date) |
781 if test(?s, f) | 781 if test(?s, f) |
782 ntl[user][date] = {} | 782 ntl[user][date] = {} |
783 ntl[user][date]['file'] = f | 783 ntl[user][date]['file'] = f |
784 ntl[user][date]['text'] = IO.readlines(f).toeuc | 784 ntl[user][date]['text'] = IO.readlines(f).join.toeuc |
785 else | 785 else |
786 File.unlink(f) # symlink points to nonexistent file | 786 File.unlink(f) # symlink points to nonexistent file |
787 end | 787 end |
788 } | 788 } |
789 if ntl[user].empty? | 789 if ntl[user].empty? |