Project

General

Profile

Actions

Bug #2407

closed

numeric literal without digits

Bug #2407: numeric literal without digits

Added by shyouhei (Shyouhei Urabe) almost 16 years ago. Updated over 14 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.2dev (2009-11-24 trunk 25898) [x86_64-linux]
Backport:
[ruby-dev:39798]

Description

=begin
以下のような実験をすると、0o_のパターンの時だけなぜか"numeric literal without digits"なる警告が出るようです。

zsh % ruby -e'0123456789'
-e:1: Invalid octal digit
0123456789
^
zsh %
zsh % ruby -e'0o123456789'
-e:1: Invalid octal digit
0o123456789
^
zsh %
zsh % ruby -e'0_123456789'
-e:1: Invalid octal digit
0_123456789
^
zsh %
zsh % ruby -e'0o_123456789'
-e:1: numeric literal without digits
0o_123456789
^
-e:1: syntax error, unexpected tIDENTIFIER, expecting $end
=end


Files

Actions

Also available in: PDF Atom