Check this:

$ cat spec/lib/plugins/filedirbug.rb
puts File.dirname(__FILE__)
eval("puts File.dirname(__FILE__)")

$ ruby spec/lib/plugins/filedirbug.rb
spec/lib/plugins
.