Skip to content

Range with excluding and float while calling rand causes TypeError: cannot exclude non Integer end value #1506

@deepj

Description

@deepj

No issue under MRI.

To reproduce:

rand(0...1.0)

Error:

TypeError: cannot exclude non Integer end value
	from (irb):2:in `max'
	from (irb):2:in `random_range'
	from (irb):2:in `random'
	from (irb):2:in `rand'
	from (irb):2
	from ~/.rubies/truffleruby-1.0.0-rc9/bin/irb:29:in `<main>'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions