Red Hat Bugzilla – Bug 520987
Ruby version packaged contains short-named constant bug
Last modified: 2009-09-04 08:39:41 EDT
Description of problem:
The version of Ruby packaged on FC11 contains a bug in the use of short-named constants. This breaks certain Ruby applications that depend on this feature, including the Metasploit Framework. Gentoo and Ubuntu have now fixed their packages, but FC/RH has not yet.
Version-Release number of selected component (if applicable): 1.8.6
Place this into a ruby script and run it:
# Check for the ugly 1.8.6/1.8.7 short-named constants bug
Const = 'A'
Const == 'A'
ConstBugTestC = ConstBugTestA.dup
class ConstBugTestB < ConstBugTestC
Const = 'B'
bugged = false
bugged = true
$stderr.puts "This interpreter is broken!"
Alternatively, just run Metasploit:
Steps to Reproduce:
1. svn co https://metasploit.com/svn/framework3/trunk/ msf3/
2. ruby msf3/msfconsole
3. Look for the warning
Big warning message
No warning and working code
Current F-11 ruby is ruby-18.104.22.1689-1.fc11 and I cannot reproduce
Looks like it was user error in the report we received - they had built their own ruby version and forgotten about it (older Fedora releases did have this issue). Thanks!