2 /*************************************************************************************
5 * Author: Amit Gupta (http://blog.igeek.info/)
6 * Copyright: (c) 2005 Amit Gupta (http://blog.igeek.info/)
7 * Release Version: 1.0.7.6
8 * CVS Revision Version: $Revision: 1.6 $
9 * Date Started: 2005/09/05
10 * Last Modified: $Date: 2006/01/05 06:36:24 $
12 * Ruby language file for GeSHi
17 * - Add =begin multiline comments (Juan J. MartÃnez)
18 * - Add ` string (Juan J. MartÃnez)
22 * TODO (updated 2005/09/05)
23 * -------------------------
24 * * Add the remaining keywords, methods, classes as per
25 * v1.8.2(as listed in the online manual)
27 *************************************************************************************
29 * This file is part of GeSHi.
31 * GeSHi is free software; you can redistribute it and/or modify
32 * it under the terms of the GNU General Public License as published by
33 * the Free Software Foundation; either version 2 of the License, or
34 * (at your option) any later version.
36 * GeSHi is distributed in the hope that it will be useful,
37 * but WITHOUT ANY WARRANTY; without even the implied warranty of
38 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 * GNU General Public License for more details.
41 * You should have received a copy of the GNU General Public License
42 * along with GeSHi; if not, write to the Free Software
43 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
45 ************************************************************************************/
47 $language_data = array (
48 'LANG_NAME' => 'Ruby',
49 'COMMENT_SINGLE' => array(1 => "#"),
50 'COMMENT_MULTI' => array( "=begin" => "=end"),
51 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE
,
52 'QUOTEMARKS' => array('"', '`'),
53 'ESCAPE_CHAR' => '\\',
56 'alias', 'and', 'begin', 'break', 'case', 'class',
57 'def', 'defined', 'do', 'else', 'elsif', 'end',
58 'ensure', 'for', 'if', 'in', 'module', 'while',
59 'next', 'not', 'or', 'redo', 'rescue', 'yield',
60 'retry', 'super', 'then', 'undef', 'unless',
61 'until', 'when', 'BEGIN', 'END', 'include'
65 '__FILE__', '__LINE__', 'false', 'nil', 'self', 'true', 'return'
68 'Array', 'Float', 'Integer', 'String', 'at_exit',
69 'autoload', 'binding', 'caller', 'catch', 'chop', 'chop!',
70 'chomp', 'chomp!', 'eval', 'exec', 'exit', 'exit!', 'fail',
71 'fork', 'format', 'gets', 'global_variables', 'gsub', 'gsub!',
72 'iterator?', 'lambda', 'load', 'local_variables', 'loop', 'open',
73 'p', 'print', 'printf', 'proc', 'putc', 'puts', 'raise',
74 'rand', 'readline', 'readlines', 'require', 'select', 'sleep',
75 'split', 'sprintf', 'srand', 'sub', 'sub!', 'syscall',
76 'system', 'test', 'trace_var', 'trap', 'untrace_var'
80 '(', ')', '[', ']', '{', '}', '@', '%', '&', '*', '|', '/', '<', '>',
81 '+', '-', '=>', '=>'
83 'CASE_SENSITIVE' => array(
84 GESHI_COMMENTS
=> false
,
91 1 => 'color:#9966CC; font-weight:bold;',
92 2 => 'color:#0000FF; font-weight:bold;',
93 3 => 'color:#CC0066; font-weight:bold;'
96 1 => 'color:#008000; font-style:italic;',
97 'MULTI' => 'color:#000080; font-style:italic;'
99 'ESCAPE_CHAR' => array(
100 0 => 'color:#000099;'
103 0 => 'color:#006600; font-weight:bold;'
106 0 => 'color:#996600;'
109 0 => 'color:#006666;'
112 1 => 'color:#9900CC;'
115 0 => 'color:#006600; font-weight:bold;'
131 'OBJECT_SPLITTERS' => array(
136 'STRICT_MODE_APPLIES' => GESHI_MAYBE
,
137 'SCRIPT_DELIMITERS' => array(
142 'HIGHLIGHT_STRICT_BLOCK' => array(