Skip to content

Instantly share code, notes, and snippets.

@swalberg
Created January 21, 2014 17:21
Show Gist options
  • Save swalberg/8544189 to your computer and use it in GitHub Desktop.
Save swalberg/8544189 to your computer and use it in GitHub Desktop.
bob:tmp $ strace -e trace=file ruby ./test.rb |& grep foo
open("/tmp/foo.rb", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 7
open("/tmp/foo.rb", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 7
lstat64("/tmp/foo.rb", {st_mode=S_IFREG|0644, st_size=20, ...}) = 0
bob:tmp $ echo "require './foo'" >> test.rb
bob:tmp $ strace -e trace=file ruby ./test.rb |& grep foo
open("/tmp/foo.rb", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 7
open("/tmp/foo.rb", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 7
lstat64("/tmp/foo.rb", {st_mode=S_IFREG|0644, st_size=20, ...}) = 0
open("/tmp/foo.rb", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 7
require './foo'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment