summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-30 08:43:28 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-30 08:43:28 +0000
commit54d534f04313a0437a613516169cb243b695ccaf (patch)
tree04fc0c8f6e436dbe5025298e3d61851252820e27 /misc
parent864bc4f18beb189c07a22e605810bb8d6eef5645 (diff)
* string.c (rb_str_chomp_bang): do smart chomp if $/ == '\n'.
* io.c (rb_io_puts): don't treat Array specially. * bignum.c (rb_big_cmp): should convert bignum to float. * eval.c (rb_f_eval): can't modify untainted binding. * regex.c (re_compile_pattern): should preverve p0 value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc')
-rw-r--r--misc/ruby-mode.el18
1 files changed, 11 insertions, 7 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index a665685523..7f7cebef75 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -671,26 +671,30 @@ An end of a defun is found by moving forward from the beginning of one."
'(
;; #{ }, #$hoge, #@foo are not comments
("\\(#\\)[{$@]" 1 (1 . nil))
- ;; the last $' in the string ,'...$' is not variable
- ("\\(^\\|[[\\s <+(,]\\)\\('\\)[^'\n\\\\]*\\(\\\\.[^'\n\\\\]*\\)*[\\?\\$]\\('\\)"
+ ;; the last $' in the string ,'...$' is not variable
+ ;; the last ?' in the string ,'...?' is not ascii code
+ ("\\(^\\|[[\\s <+(,=]\\)\\('\\)[^'\n\\\\]*\\(\\\\.[^'\n\\\\]*\\)*[\\?\\$]\\('\\)"
(2 (7 . nil))
(4 (7 . nil)))
- ;; the last $` in the string ,`...$` is not variable
- ("\\(^\\|[[\\s <+(,]\\)\\(`\\)[^`\n\\\\]*\\(\\\\.[^`\n\\\\]*\\)*[\\?\\$]\\(`\\)"
+ ;; the last $` in the string ,`...$` is not variable
+ ;; the last ?` in the string ,`...?` is not ascii code
+ ("\\(^\\|[[\\s <+(,=]\\)\\(`\\)[^`\n\\\\]*\\(\\\\.[^`\n\\\\]*\\)*[\\?\\$]\\(`\\)"
(2 (7 . nil))
(4 (7 . nil)))
- ;; the last $" in the string ,"...$" is not variable
- ("\\(^\\|[[\\s <+(,]\\)\\(\"\\)[^\"\n\\\\]*\\(\\\\.[^\"\n\\\\]*\\)*[\\?\\$]\\(\"\\)"
+ ;; the last $" in the string ,"...$" is not variable
+ ;; the last ?" in the string ,"...?" is not ascii code
+ ("\\(^\\|[[\\s <+(,=]\\)\\(\"\\)[^\"\n\\\\]*\\(\\\\.[^\"\n\\\\]*\\)*[\\?\\$]\\(\"\\)"
(2 (7 . nil))
(4 (7 . nil)))
;; $' $" $` .... are variables
+ ;; ?' ?" ?` are ascii codes
("[\\?\\$][#\"'`]" 0 (1 . nil))
;; regexps
("\\(^\\|[=(,~?:;]\\|\\(^\\|\\s \\)\\(if\\|elsif\\|unless\\|while\\|until\\|when\\|and\\|or\\|&&\\|||\\)\\|g?sub!?\\|scan\\|split!?\\)\\s *\\(/\\)[^/\n\\\\]*\\(\\\\.[^/\n\\\\]*\\)*\\(/\\)"
(4 (7 . ?/))
(6 (7 . ?/)))
;; %Q!...!
- ("\\(^\\|[[\\s <+(,]\\)%[xrqQ]?\\([^a-zA-Z0-9 \n]\\)[^\n\\\\]*\\(\\\\.[^\n\\\\]*\\)*\\(\\2\\)"
+ ("\\(^\\|[[\\s <+(,=]\\)%[xrqQ]?\\([^a-zA-Z0-9 \n]\\)[^\n\\\\]*\\(\\\\.[^\n\\\\]*\\)*\\(\\2\\)"
(2 (7 . nil))
(4 (7 . nil)))
("^\\(=\\)begin\\(\\s \\|$\\)" 1 (7 . nil))