# Re: Hash default -- what's going on here?

**URL:** <https://www.ruby-forum.com/t/re-hash-default-whats-going-on-here/82149>\
**Category:** Ruby\
**Created:** [March 15, 2006, 10:37am UTC](https://www.ruby-forum.com/t/re-hash-default-whats-going-on-here/82149 "2006-03-15T10:37:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KroegerS\_Simon\_Sext](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/57b2e6/32.png) [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Post date:** [March 15, 2006, 10:37am UTC](https://www.ruby-forum.com/t/re-hash-default-whats-going-on-here/82149/1 "2006-03-15T10:37:27Z")

</div>

> […]  
> Sigh. Hardly a novel gotcha, but I fell right into it.
> 
> Not sure of the best way to do what I want – maybe just use  
> ‘has\_key?’  
> and then do the right thing.  
> – Pete –

maybe

listA=[“line1”,“line2”,“line3”]  
listB=[“line5”,“line3”,“line4”]

puts(listA & listB)

#=\> line3

?

cheers

Simon
