Skip to main content

RHASH_SIZE

Function RHASH_SIZE 

Source
pub unsafe fn RHASH_SIZE(obj: VALUE) -> usize
Expand description

Get hash size (akin to RHASH_SIZE).

Returns the number of entries in the hash.

@param[in] obj A Ruby Hash object. @return Number of entries.

ยงSafety

This function is unsafe because it dereferences a raw pointer to access underlying Ruby data. The caller must ensure the VALUE is a valid Hash.