(defun rinari-highlight-keywords (keywords)
"Highlight the passed KEYWORDS in current buffer.
Use `font-lock-add-keywords' in case of `ruby-mode' or
`ruby-extra-keywords' in case of Enhanced Ruby Mode."
(if (boundp 'ruby-extra-keywords)
(progn
(setq ruby-extra-keywords (append ruby-extra-keywords keywords))
(ruby-local-enable-extra-keywords))
(font-lock-add-keywords
nil
(list (list
(concat "\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b"
(regexp-opt keywords t)
(eval-when-compile (if (string-match "\\_>" "ruby")
"\\_>"
"\\>")))
(list 2 'font-lock-builtin-face))))))