<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>Object.send(:remove_const, :Polygon) </title>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
body {
margin: 5px 5px 5px 5px;
background-color: #ffffff;
}
/* ========== Text Styles ========== */
hr { color: #000000}
body, table /* Normal text */
{
font-size: 9pt;
font-family: 'Courier New';
font-style: normal;
font-weight: normal;
color: #000000;
text-decoration: none;
}
span.rvts1 /* Heading */
{
font-size: 10pt;
font-family: 'Arial';
font-weight: bold;
color: #0000ff;
}
span.rvts2 /* Subheading */
{
font-size: 10pt;
font-family: 'Arial';
font-weight: bold;
color: #000080;
}
span.rvts3 /* Keywords */
{
font-size: 10pt;
font-family: 'Arial';
font-style: italic;
color: #800000;
}
a.rvts4, span.rvts4 /* Jump 1 */
{
font-size: 10pt;
font-family: 'Arial';
color: #008000;
text-decoration: underline;
}
a.rvts5, span.rvts5 /* Jump 2 */
{
font-size: 10pt;
font-family: 'Arial';
color: #008000;
text-decoration: underline;
}
/* ========== Para Styles ========== */
p,ul,ol /* Paragraph Style */
{
text-align: left;
text-indent: 0px;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
}
.rvps1 /* Centered */
{
text-align: center;
}
--></style>
</head>
<body>
<p>Newbie here.</p>
<p><br></p>
<p><br></p>
<p>F:\InstantRails-2.0-win\rails_apps>irb -v</p>
<p>irb 0.9.5(05/04/13)</p>
<p><br></p>
<p>F:\InstantRails-2.0-win\rails_apps>ruby -v</p>
<p>ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]</p>
<p><br></p>
<p><br></p>
<p><br></p>
<p>Consider</p>
<p><br></p>
<p><br></p>
<p>irb(main):001:0> class X</p>
<p>irb(main):002:1> end</p>
<p>=> nil</p>
<p>irb(main):003:0></p>
<p>irb(main):004:0* class Y < X</p>
<p>irb(main):005:1> end</p>
<p>=> nil</p>
<p>irb(main):006:0></p>
<p>irb(main):007:0* Object.send(:remove_const, :X)</p>
<p>=> X</p>
<p>irb(main):008:0></p>
<p>irb(main):009:0* X.class</p>
<p>NameError: uninitialized constant X</p>
<p> from (irb):9</p>
<p> from :0</p>
<p>irb(main):010:0> Y.class</p>
<p>=> Class</p>
<p>irb(main):011:0> Y.superclass</p>
<p>=> X</p>
<p>irb(main):012:0> Y.superclass.superclass</p>
<p>=> Object</p>
<p>irb(main):013:0></p>
<p><br></p>
<p><br></p>
<p>How can the class X still exist when it has been removed?????</p>
</body></html>