Confusion with some File::methods

Hi,

(a) How does absolute_path(file_nam) differ from
absolute_path(file_name[, dir_string] )?

(b) How does realdirpath(pathname) differ from realdirpath(pathname [,
dir_string]) ?

Could you please tell me the concept as asked above with a suitable
example?

Thanks,

It will use the present working directory unless you specify otherwise.

irb(main):001:0> File.absolute_path ‘a.txt’
=> “C:/Users/Joel/a.txt”
irb(main):002:0> File.absolute_path ‘a.txt’, ‘C:/Test/’
=> “C:/Test/a.txt”
irb(main):003:0>