Win32API and frozen objects?

Discussion in 'Ruby' started by Daniel Berger, Jun 11, 2005.

  1. 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
    Daniel Berger, Jun 11, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Kent
    Replies:
    2
    Views:
    325
    Mike Kent
    Dec 30, 2003
  2. est
    Replies:
    1
    Views:
    550
  3. Ara.T.Howard

    1.8,frozen, and untaint

    Ara.T.Howard, Sep 25, 2003, in forum: Ruby
    Replies:
    1
    Views:
    97
  4. LC Geldenhuys
    Replies:
    5
    Views:
    257
    Robert Klemme
    Feb 18, 2004
  5. Brian Candler

    Symbols and frozen strings

    Brian Candler, Sep 6, 2007, in forum: Ruby
    Replies:
    12
    Views:
    198
    Daniel DeLorme
    Sep 7, 2007
Loading...

Share This Page