Project

General

Profile

« Previous | Next » 

Revision 48de2ea5

Added by mame (Yusuke Endoh) almost 6 years ago

range.c: prohibit (1..nil)

Now endless range can be created by either a literal (1..) or explicit
range creation Range.new(1, nil). [Bug #14845]

This change is intended for "early failure"; for example,
(1..var).to_a causes out of memory if var is inadvertently nil.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e