summaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/lexers/ruby.py
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2024-05-20 07:58:40 +0300
committerrobot-piglet <[email protected]>2024-05-20 08:05:00 +0300
commitbcd5bcc390793791d293d386b2ebefbe683fb4e1 (patch)
treec93e3b8c847237e7e7626f4a07f1b657bb34f04d /contrib/python/Pygments/py3/pygments/lexers/ruby.py
parent1a9f1508fe9c8c5927ffebf33197a6108e70501d (diff)
Intermediate changes
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/ruby.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/lexers/ruby.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/ruby.py b/contrib/python/Pygments/py3/pygments/lexers/ruby.py
index 466d6e75219..134ff779f23 100644
--- a/contrib/python/Pygments/py3/pygments/lexers/ruby.py
+++ b/contrib/python/Pygments/py3/pygments/lexers/ruby.py
@@ -4,7 +4,7 @@
Lexers for Ruby and related languages.
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -36,6 +36,7 @@ class RubyLexer(ExtendedRegexLexer):
filenames = ['*.rb', '*.rbw', 'Rakefile', '*.rake', '*.gemspec',
'*.rbx', '*.duby', 'Gemfile', 'Vagrantfile']
mimetypes = ['text/x-ruby', 'application/x-ruby']
+ version_added = ''
flags = re.DOTALL | re.MULTILINE
@@ -124,7 +125,7 @@ class RubyLexer(ExtendedRegexLexer):
('backtick', String.Backtick, '`'):
states['simple-'+name] = [
include('string-intp-escaped'),
- (r'[^\\%s#]+' % end, ttype),
+ (rf'[^\\{end}#]+', ttype),
(r'[\\#]', ttype),
(end, ttype, '#pop'),
]
@@ -399,6 +400,8 @@ class RubyConsoleLexer(Lexer):
name = 'Ruby irb session'
aliases = ['rbcon', 'irb']
mimetypes = ['text/x-ruby-shellsession']
+ url = 'https://www.ruby-lang.org'
+ version_added = ''
_example = 'rbcon/console'
_prompt_re = re.compile(r'irb\([a-zA-Z_]\w*\):\d{3}:\d+[>*"\'] '
@@ -436,14 +439,13 @@ class FancyLexer(RegexLexer):
Fancy is a self-hosted, pure object-oriented, dynamic,
class-based, concurrent general-purpose programming language
running on Rubinius, the Ruby VM.
-
- .. versionadded:: 1.5
"""
name = 'Fancy'
url = 'https://github.com/bakkdoor/fancy'
filenames = ['*.fy', '*.fancypack']
aliases = ['fancy', 'fy']
mimetypes = ['text/x-fancysrc']
+ version_added = '1.5'
tokens = {
# copied from PerlLexer: