class method
ENV.length
ENV.length → an_integer
ENV.size → an_integer
hash.c
View on GitHub ↗
static VALUE
env_size(VALUE _)
{
return INT2FIX(env_size_with_lock());
}
Returns the count of environment variables:
Example
ENV.replace('foo' => '0', 'bar' => '1') ENV.length # => 2 ENV.size # => 2