Example #1
0
File: hash.cpp Project: Zoxc/mirb
	value_t Hash::rb_delete(Hash *self, value_t key, value_t block)
	{
		OnStack<2> os(self, key);

		value_t value = HashAccess::remove(self, key);

		if(value != value_undef)
			return value;
		else if(block->test())
			return yield(block, key);
		else
			return self->get_default(key);
	}
Example #2
0
	value_t FalseClass::rb_xor(value_t value)
	{
		return value->test() ? value_true : value_false;
	}