C
Chris Shea
Hello,
I was working on a script and running into problems with passing an
argument with a wildcard with the C:\WINDOWS\System32 path. Observe:
---
C:\>more test.rb
puts ARGV
C:\>test.rb C:\ruby\*.txt
C:/ruby/ChangeLog.txt
C:/ruby/LICENSE.txt
C:/ruby/ReleaseNotes.txt
C:\>test.rb C:\WINDOWS\system32\runonce.exe
C:\WINDOWS\system32\runonce.exe
C:\>test.rb C:\WINDOWS\system32\runonce.ex*
[BUG] cross-thread violation on rb_gc()
ruby 1.8.5 (2006-08-25) [i386-mswin32]
This application has requested the Runtime to terminate it in an
unusual way.
Please contact the application's support team for more information.
C:\>ruby -v
ruby 1.8.5 (2006-08-25) [i386-mswin32]
---
I haven't been able to figure out or find a workaround (besides just
knowing all the filenames) or fix.
I thought Windows takes care of the wildcard, generating the argument
list. I don't know how that would help, but earlier today it made
sense to me that it meant something.
And this happens even if ARGV is never referenced (e.g. an empty
test.rb does the same thing), so it looks like the violation happens
even before the script is interpreted.
And, yes, I'm logged in with an administrator account (Windows users
usually are, aren't they?).
Anyone have any insight? Or is this just one of those things (one of
those things about working with Windows)?
I was working on a script and running into problems with passing an
argument with a wildcard with the C:\WINDOWS\System32 path. Observe:
---
C:\>more test.rb
puts ARGV
C:\>test.rb C:\ruby\*.txt
C:/ruby/ChangeLog.txt
C:/ruby/LICENSE.txt
C:/ruby/ReleaseNotes.txt
C:\>test.rb C:\WINDOWS\system32\runonce.exe
C:\WINDOWS\system32\runonce.exe
C:\>test.rb C:\WINDOWS\system32\runonce.ex*
[BUG] cross-thread violation on rb_gc()
ruby 1.8.5 (2006-08-25) [i386-mswin32]
This application has requested the Runtime to terminate it in an
unusual way.
Please contact the application's support team for more information.
C:\>ruby -v
ruby 1.8.5 (2006-08-25) [i386-mswin32]
---
I haven't been able to figure out or find a workaround (besides just
knowing all the filenames) or fix.
I thought Windows takes care of the wildcard, generating the argument
list. I don't know how that would help, but earlier today it made
sense to me that it meant something.
And this happens even if ARGV is never referenced (e.g. an empty
test.rb does the same thing), so it looks like the violation happens
even before the script is interpreted.
And, yes, I'm logged in with an administrator account (Windows users
usually are, aren't they?).
Anyone have any insight? Or is this just one of those things (one of
those things about working with Windows)?