浏览代码

Class comment for UndefinedObject

Nicolas Petton 13 年之前
父节点
当前提交
7bf591c260
共有 2 个文件被更改,包括 5 次插入0 次删除
  1. 1 0
      js/Kernel-Objects.js
  2. 4 0
      st/Kernel-Objects.st

+ 1 - 0
js/Kernel-Objects.js

@@ -3210,6 +3210,7 @@ smalltalk.Date.klass);
 
 
 smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel-Objects');
+smalltalk.UndefinedObject.comment=unescape('UndefinedObject%20describes%20the%20behavior%20of%20its%20sole%20instance%2C%20%60nil%60.%20%60nil%60%20represents%20a%20prior%20value%20for%20variables%20that%20have%20not%20been%20initialized%2C%20or%20for%20results%20which%20are%20meaningless.%0A%0A%60nil%60%20is%20the%20Smalltalk%20representation%20of%20the%20%60undefined%60%20JavaScript%20object.')
 smalltalk.addMethod(
 unescape('_subclass_instanceVariableNames_'),
 smalltalk.method({

+ 4 - 0
st/Kernel-Objects.st

@@ -1141,6 +1141,10 @@ millisecondsToRun: aBlock
 Object subclass: #UndefinedObject
 	instanceVariableNames: ''
 	category: 'Kernel-Objects'!
+!UndefinedObject commentStamp!
+UndefinedObject describes the behavior of its sole instance, `nil`. `nil` represents a prior value for variables that have not been initialized, or for results which are meaningless.
+
+`nil` is the Smalltalk representation of the `undefined` JavaScript object.!
 
 !UndefinedObject methodsFor: 'class creation'!