Creating a file and saving in public directory

With Ruby V1.87p72 on MacOS X 10.5

662 > cat junk/newbe
cat: junk/newbe: No such file or directory

663 > irb
irb(main):001:0> Dir.mkdir("junk")
=> 0
irb(main):002:0> Dir.chdir("junk")
=> 0
irb(main):003:0> f = File.new("newbe", "w+")
=> #<File:newbe>
irb(main):004:0> f.write("hello world\n")
=> 12
irb(main):005:0> f.close
=> nil
irb(main):006:0> quit

664 > cat junk/newbe
hello world

Rick