Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Boolean: fix help file, add asInteger and binaryValue subclassRespons…

…ibility

Boolean must respond to the methods mentioned in the help file,
or else it renders "method not found".
  • Loading branch information...
commit 0d2a14776cc6de2810103d82b2e7e9a7858c513e 1 parent 621d485
@lijon lijon authored
View
3  HelpSource/Classes/Boolean.schelp
@@ -49,12 +49,13 @@ method::if
If the receiver is true, answer the evaluation of the trueFunc. If the receiver is false, answer the evaluation of the falseFunc.
+method::asInteger
method::binaryValue
returns:: 1 if the receiver is true, and 0 if the receiver is false.
+method::asBoolean
method::booleanValue
-
Returns:: The receiver. The same message is understood by link::Classes/SimpleNumber:: and can be used to convert it to boolean.
method::keywordWarnings
View
2  SCClassLibrary/Common/Core/Boolean.sc
@@ -8,6 +8,8 @@ Boolean {
and { ^this.subclassResponsibility(thisMethod) }
or { ^this.subclassResponsibility(thisMethod) }
nand { ^this.subclassResponsibility(thisMethod) }
+ asInteger { ^this.subclassResponsibility(thisMethod) }
+ binaryValue { ^this.subclassResponsibility(thisMethod) } // TODO: deprecate for asInteger
asBoolean { ^this }
booleanValue { ^this } // TODO in the long-run, deprecate for asBoolean
Please sign in to comment.
Something went wrong with that request. Please try again.