Issue #8432 has been updated by AndrewCPaterson (Andrew Paterson).


It is because there is a zero length file in a subdirectory under bin.  There needs to be protection against this in rbinstall.rb
----------------------------------------
Bug #8432: make install ruby 2.0.0 fails with undefined method `sub!'
https://bugs.ruby-lang.org/issues/8432#change-39491

Author: AndrewCPaterson (Andrew Paterson)
Status: Feedback
Priority: Normal
Assignee: cruby-linux
Category: build
Target version: 
ruby -v: ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
Backport: 


./tool/rbinstall.rb:468 is trying to reference shebang.sub! on command scripts destined for /usr/local/bin and that's failing.


Steps:
./configure --host="arm-xilinx-linux-gnueabi" 
make
make install DESTDIR=../newramdisk_mnt
...
ruby --disable=gems -I/export/sata/home/apaterson/Xara/z_ZedBoard_Linux_sw/ruby-2.0.0-p0 -rarm-linux-eabi-fake  ./tool/rbinstall.rb --make="make" --dest-dir="../newramdisk_mnt" --extout=".ext" --mflags="" --make-flags="DESTDIR=../newramdisk_mnt" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc" --install=all --rdoc-output=".ext/rdoc"
installing binary commands:   /usr/local/bin
installing base libraries:    /usr/local/lib
installing arch files:        /usr/local/lib/ruby/2.0.0/arm-linux-eabi
installing pkgconfig data:    /usr/local/lib/pkgconfig
installing extension objects: /usr/local/lib/ruby/2.0.0/arm-linux-eabi
installing extension objects: /usr/local/lib/ruby/site_ruby/2.0.0/arm-linux-eabi
installing extension objects: /usr/local/lib/ruby/vendor_ruby/2.0.0/arm-linux-eabi
installing extension headers: /usr/local/include/ruby-2.0.0/arm-linux-eabi
installing extension scripts: /usr/local/lib/ruby/2.0.0
installing extension scripts: /usr/local/lib/ruby/site_ruby/2.0.0
installing extension scripts: /usr/local/lib/ruby/vendor_ruby/2.0.0
installing extension headers: /usr/local/include/ruby-2.0.0/ruby
installing rdoc:              /usr/local/share/ri/2.0.0/system
installing capi-docs:         /usr/local/share/doc/ruby
installing command scripts:   /usr/local/bin
./tool/rbinstall.rb:468:in `block (2 levels) in <main>': undefined method `sub!' for nil:NilClass (NoMethodError)
	from ./tool/rbinstall.rb:248:in `block in install_recursive'
	from ./tool/rbinstall.rb:242:in `each'
	from ./tool/rbinstall.rb:242:in `install_recursive'
	from ./tool/rbinstall.rb:456:in `block in <main>'
	from ./tool/rbinstall.rb:758:in `call'
	from ./tool/rbinstall.rb:758:in `block (2 levels) in <main>'
	from ./tool/rbinstall.rb:755:in `each'
	from ./tool/rbinstall.rb:755:in `block in <main>'
	from ./tool/rbinstall.rb:751:in `each'
	from ./tool/rbinstall.rb:751:in `<main>'
make: *** [do-install-all] Error 1



-- 
http://bugs.ruby-lang.org/