# Backticks failing in Ruby built with VC++ 8

**URL:** <https://www.ruby-forum.com/t/backticks-failing-in-ruby-built-with-vc-8/83639>\
**Category:** Ruby\
**Created:** [January 28, 2007, 4:56am UTC](https://www.ruby-forum.com/t/backticks-failing-in-ruby-built-with-vc-8/83639 "2007-01-28T04:56:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 28, 2007, 4:56am UTC](https://www.ruby-forum.com/t/backticks-failing-in-ruby-built-with-vc-8/83639/1 "2007-01-28T04:56:17Z")

</div>

Hi all,

Ruby 1.8.5 p12  
Windows XP SP2

I’m getting a segfault when I use the backtick operator in a Ruby built  
with VC++ 8:

pwd = `pwd`.chomp

It works fine with the one click (VC++ 6).

Is anyone else seeing this behavior? I want to make sure I haven’t done  
something silly before officially filing this as a bug report. If it is  
a bug, I’m guessing I need to examine the CreateChild function in Ruby’s  
win32.c file. Please point me to the appropriate location if that’s not  
correct.

Thanks,

Dan

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 28, 2007, 5:05am UTC](https://www.ruby-forum.com/t/backticks-failing-in-ruby-built-with-vc-8/83639/2 "2007-01-28T05:05:18Z")

</div>

On Jan 27, 2007, at 19:55, Daniel B. wrote:

> It works fine with the one click (VC++ 6).
> 
> Is anyone else seeing this behavior? I want to make sure I haven’t  
> done something silly before officially filing this as a bug  
> report. If it is a bug, I’m guessing I need to examine the  
> CreateChild function in Ruby’s win32.c file. Please point me to the  
> appropriate location if that’s not correct.

Isn’t pwd a shell builtin on WinXP?

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)

I LIT YOUR GEM ON FIRE!

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 28, 2007, 5:15am UTC](https://www.ruby-forum.com/t/backticks-failing-in-ruby-built-with-vc-8/83639/3 "2007-01-28T05:15:19Z")

</div>

Eric H. wrote:

> > It works fine with the one click (VC++ 6).
> > 
> > Is anyone else seeing this behavior? I want to make sure I haven’t  
> > done something silly before officially filing this as a bug report.  
> > If it is a bug, I’m guessing I need to examine the CreateChild  
> > function in Ruby’s win32.c file. Please point me to the appropriate  
> > location if that’s not correct.
> 
> Isn’t pwd a shell builtin on WinXP?  
> Yes. Is that significant?

Dan

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 28, 2007, 8:33am UTC](https://www.ruby-forum.com/t/backticks-failing-in-ruby-built-with-vc-8/83639/4 "2007-01-28T08:33:31Z")

</div>

Nobuyoshi N. wrote:

> Active code page: 437  
> C:\Documents and Settings\nobu\>ver
> 
> Microsoft Windows XP [Version 5.1.2600]
> 
> C:\Documents and Settings\nobu\>pwd  
> ‘pwd’ is not recognized as an internal or external command,  
> operable program or batch file.

Oh, you’re right (I got it from Unix Utils). But, it doesn’t matter. It  
happens with any command. I tried ‘dir’, ‘path’, etc.

Regards,

Dan

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 28, 2007, 11:34am UTC](https://www.ruby-forum.com/t/backticks-failing-in-ruby-built-with-vc-8/83639/5 "2007-01-28T11:34:46Z")

</div>

On Jan 27, 2007, at 20:14, Daniel B. wrote:

> > > pwd = `pwd`.chomp  
> > > Yes. Is that significant?  
> > > It seems to be.

`ruby -v` works for me, but `pwd` doesn’t.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)

I LIT YOUR GEM ON FIRE!

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 28, 2007, 8:04am UTC](https://www.ruby-forum.com/t/backticks-failing-in-ruby-built-with-vc-8/83639/6 "2007-01-28T08:04:28Z")

</div>

Hi,

At Sun, 28 Jan 2007 13:14:14 +0900,  
Daniel B. wrote in [ruby-talk:236504]:

> > Isn’t pwd a shell builtin on WinXP?  
> > Yes. Is that significant?

Really?

C:\Documents and Settings\nobu\>us  
Active code page: 437  
C:\Documents and Settings\nobu\>ver

Microsoft Windows XP [Version 5.1.2600]

C:\Documents and Settings\nobu\>pwd  
‘pwd’ is not recognized as an internal or external command,  
operable program or batch file.

---

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [January 28, 2007, 3:31pm UTC](https://www.ruby-forum.com/t/backticks-failing-in-ruby-built-with-vc-8/83639/7 "2007-01-28T15:31:43Z")

</div>

Eric H. wrote:

> > > > 
> > > 
> > > Isn’t pwd a shell builtin on WinXP?  
> > > Yes. Is that significant?
> 
> It seems to be.
> 
> `ruby -v` works for me, but `pwd` doesn’t.

As I responded to Nobu, it happens with any command. Besides, ‘pwd’  
works if you’re using the Windows PowerShell. 🙂

Dan
