Removing unnecessary .to_a call
Fixing intersection case in range_set
Removing global namespaces
Moving test of private method into public method
Merging upstream changes