use singleton function in spec
Merge branch 'master' into scala-2.9.2