Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit080f8a8

Browse files
committed
add support for Ruby 2.1 number literal suffixes
1 parentcb18c6a commit080f8a8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎lib/coderay/scanners/ruby.rb‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,10 @@ def scan_tokens encoder, options
191191
encoder.text_tokenmatch,:error
192192
method_call_expected=false
193193
else
194-
encoder.text_tokenmatch,self[1] ?:float ::integer# TODO: send :hex/:octal/:binary
194+
kind=self[1] ?:float ::integer# TODO: send :hex/:octal/:binary
195+
match <<'r'ifmatch !~/e/i &&scan(/r/)
196+
match <<'i'ifscan(/i/)
197+
encoder.text_tokenmatch,kind
195198
end
196199
value_expected=false
197200

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp