Sticky bit enabled Script can’t write to a root file

I have 2 files in the /tmp/. The first one is named “file” with permission -rw——- and owner root:root. The second file is named “script” which is a simple Ruby script with permission -rwsr-xr-x and owner root:root. The contents of the script file is: #!/usr/bin/ruby -w $-v = true IO.write(File.join(Dir.pwd, ‘file’), ‘hello!’) And the file…