File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -32,16 +32,23 @@ module Banner
32
32
33
33
def self . readfile ( fname )
34
34
base = File . expand_path ( File . dirname ( __FILE__ ) )
35
- File . open ( File . join ( base , "logos" , fname ) ) { |f | f . read f . stat . size }
35
+ pathname = File . join ( base , "logos" , fname )
36
+ begin
37
+ fdata = File . open ( pathname ) { |f | f . read f . stat . size }
38
+ rescue SystemCallError
39
+ fdata = ""
40
+ end
36
41
end
37
42
38
43
def self . to_s
39
44
if ENV [ 'GOCOW' ]
40
- case rand ( 2 )
45
+ case rand ( 3 )
41
46
when 0
42
47
self . readfile Logos [ 1 ]
43
48
when 1
44
49
self . readfile Logos [ 5 ]
50
+ when 2
51
+ self . readfile Logos [ 6 ]
45
52
end
46
53
else
47
54
self . readfile Logos [ rand ( Logos . length ) ]
Original file line number Diff line number Diff line change
1
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
+ %% %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3
+ %% %% %%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4
+ %% % %%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
+ %% %% %%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6
+ %% %%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8
+ %%%%% %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9
+ %%%% %% %%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %%%%%
10
+ %%%% %% %% % %% %% %%%%% % %%%% %% %%%%%% %%
11
+ %%%% %% %% % %%% %%%% %%%% %% %%%% %%%% %% %% %% %%% %% %%% %%%%%
12
+ %%%% %%%%%% %% %%%%%% %%%% %%% %%%% %% %% %%% %%% %% %% %%%%%
13
+ %%%%%%%%%%%% %%%% %%%%% %% %% % %% %%%% %%%% %%% %%% %
14
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%% %%%%%%%%%%%%%%
15
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%
16
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17
+
You can’t perform that action at this time.
0 commit comments