# \[bug:trunk\] call File.lchmod via rb\_funcall \[BUG\] vm\_call0: unsupported method type (7)

**URL:** <https://www.ruby-forum.com/t/bug-trunk-call-file-lchmod-via-rb-funcall-bug-vm-call0-unsupported-method-type-7/192856>\
**Category:** Development\
**Created:** [August 7, 2010, 2:41am UTC](https://www.ruby-forum.com/t/bug-trunk-call-file-lchmod-via-rb-funcall-bug-vm-call0-unsupported-method-type-7/192856 "2010-08-07T02:41:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanaka\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c67d28/32.png) [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Post date:** [August 7, 2010, 2:41am UTC](https://www.ruby-forum.com/t/bug-trunk-call-file-lchmod-via-rb-funcall-bug-vm-call0-unsupported-method-type-7/192856/1 "2010-08-07T02:41:20Z")

</div>

unimplemented method e$B$re(B rb\_funcall e$B$G8F$S=P$9$He(B [BUG]  
e$B$K$J$k$h$&$G$9!#e(B

pathname e$B$Ge(B Pathname#lchmod e$B$r\<BAu$9$k$N$Ke(B File.lchmod  
e$B$r8F$S=P$=$&$H$7$Fe(B  
rb\_funcall(rb\_cFile, rb\_intern(“lchmod”), 2, mode, get\_strpath(self))  
e$B$H$7$?$i!"e(BFile.lchmod e$B$,e(B unimplemented method e$B$Je(B  
GNU/Linux e$B$G$O!"0J2\<$N$h$&$Ke(B  
[BUG] vm\_call0: unsupported method type (7)  
e$B$H$J$j$^$7$?!#e(B

% ./ruby -rpathname -e ‘Pathname(“foo”).lchmod(nil)’  
-e:1: [BUG] vm\_call0: unsupported method type (7)  
ruby 1.9.3dev (2010-08-07 trunk 28891) [i686-linux]

## – control frame ---------- c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :lchmod c:0003 p:0018 s:0006 b:0006 l:000ff4 d:0021ec EVAL -e:1 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:000ff4 d:000ff4 TOP

## – Ruby level backtrace information

-e:1:in `<main>' -e:1:in `lchmod’

## – C level backtrace information

./ruby [0x8155332]  
./ruby [0x818a7cf]  
./ruby(rb\_bug+0x36) [0x818a82a]  
./ruby [0x814d630]  
./ruby [0x814e404]  
./ruby [0x814e357]  
./ruby(rb\_funcall+0xa2) [0x814e4ae]  
/tmp/o0/lib/ruby/1.9.1/i686-linux/pathname.so [0xb77c68da]  
./ruby [0x814a426]  
./ruby [0x814a2c9]  
./ruby [0x814989d]  
./ruby [0x814548a]  
./ruby [0x81526b6]  
./ruby [0x8152e8f]  
./ruby [0x805b262]  
./ruby(ruby\_exec\_node+0x1c) [0x805b36b]  
./ruby(ruby\_run\_node+0x3b) [0x805b33f]  
./ruby [0x8059d88]  
/lib/i686/cmov/libc.so.6(\_\_libc\_start\_main+0xe5) [0xb75f0455]  
./ruby [0x8059c81]

[NOTE]  
You may have encountered a bug in the Ruby interpreter or extension  
libraries.  
Bug reports are welcome.  
For details: [http://www.ruby-lang.org/bugreport.html](http://www.ruby-lang.org/bugreport.html)

zsh: abort ./ruby -rpathname -e ‘Pathname(“foo”).lchmod(nil)’

e$B$J$\*!"e(BFile.lchmod e$B$re(B Ruby  
e$B$+$i8F$S=P$9$N$OLdBj$J$/2DG=$G$9!#e(B

% ./ruby -e ‘File.lchmod(nil, “foo”)’  
-e:1:in `lchmod': lchmod() function is unimplemented on this machine (NotImplementedError) from -e:1:in `’

---

<div class="post-metadata">

**Author:** ![Tanaka\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c67d28/32.png) [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Post date:** [August 7, 2010, 2:53am UTC](https://www.ruby-forum.com/t/bug-trunk-call-file-lchmod-via-rb-funcall-bug-vm-call0-unsupported-method-type-7/192856/2 "2010-08-07T02:53:02Z")

</div>

2010e$BG/e(B8e$B7ne(B7e$BF|e(B9:40 Tanaka A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> unimplemented method e$B$re(B rb\_funcall e$B$G8F$S=P$9$He(B [BUG] e$B$K$J$k$h$&$G$9!#e(B
> 
> pathname e$B$Ge(B Pathname#lchmod e$B$r\<BAu$9$k$N$Ke(B File.lchmod e$B$r8F$S=P$=$&$H$7$Fe(B  
> rb\_funcall(rb\_cFile, rb\_intern(“lchmod”), 2, mode, get\_strpath(self))  
> e$B$H$7$?$i!"e(BFile.lchmod e$B$,e(B unimplemented method e$B$Je(B GNU/Linux e$B$G$O!"0J2\<$N$h$&$Ke(B  
> [BUG] vm\_call0: unsupported method type (7)  
> e$B$H$J$j$^$7$?!#e(B

pathname e$B$r;H$o$:$Ke(B [BUG]  
e$B$r5/$3$9$J$iNc$($P0J2\<$N$h$&$K$G$-$^$9!#e(B

% ./ruby -e ’  
class \<\< File  
alias hash lchmod  
end  
{File =\> 0 }  
’  
-e:5: [BUG] vm\_call0: unsupported method type (7)  
ruby 1.9.3dev (2010-08-07 trunk 28891) [i686-linux]

## – control frame ---------- c:0003 p:0028 s:0008 b:0006 l:000ff4 d:00078c EVAL -e:5 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:000ff4 d:000ff4 TOP

## – Ruby level backtrace information

-e:5:in `’

## – C level backtrace information

./ruby [0x8155332]  
./ruby [0x818a7cf]  
./ruby(rb\_bug+0x36) [0x818a82a]  
./ruby [0x814d630]  
./ruby [0x814e404]  
./ruby [0x814e357]  
./ruby(rb\_funcall+0xa2) [0x814e4ae]  
./ruby(rb\_hash+0x22) [0x80660bb]  
./ruby [0x8066184]  
./ruby(st\_insert+0x10e) [0x80f31e4]  
./ruby(rb\_hash\_aset+0x64) [0x8067833]  
./ruby [0x814447c]  
./ruby [0x81526b6]  
./ruby [0x8152e8f]  
./ruby [0x805b262]  
./ruby(ruby\_exec\_node+0x1c) [0x805b36b]  
./ruby(ruby\_run\_node+0x3b) [0x805b33f]  
./ruby [0x8059d88]  
/lib/i686/cmov/libc.so.6(\_\_libc\_start\_main+0xe5) [0xb7505455]  
./ruby [0x8059c81]

[NOTE]  
You may have encountered a bug in the Ruby interpreter or extension  
libraries.  
Bug reports are welcome.  
For details: [http://www.ruby-lang.org/bugreport.html](http://www.ruby-lang.org/bugreport.html)

---

<div class="post-metadata">

**Author:** ![Tanaka\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c67d28/32.png) [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Post date:** [August 7, 2010, 6:37am UTC](https://www.ruby-forum.com/t/bug-trunk-call-file-lchmod-via-rb-funcall-bug-vm-call0-unsupported-method-type-7/192856/3 "2010-08-07T06:37:47Z")

</div>

e$B%A%1%C%He(B #3662 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!\<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B  
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

This issue was solved with changeset r28895.  
Akira, thank you for reporting this issue.  
Your contribution to Ruby is greatly appreciated.  
May Ruby be with you.

* * *

[http://redmine.ruby-lang.org/issues/show/3662](http://redmine.ruby-lang.org/issues/show/3662)
