Win32API and frozen objects?

D

Daniel Berger

Hi,

Ruby 1.8.2
Windows XP

Why does this cause an error?

require "Win32API"

PathIsURL = Win32API.new("shlwapi","PathIsURL","P","L")

path = "file:///foo/bar"
path.freeze

if PathIsURL.call(path) > 0
puts "yes"
else
puts "no"
end

puts path

As far as I can tell, path isn't being modified. What's happening?

Regards,

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top