Menu

#1134 instancemethod does not return .nil if expected

4.1.3
closed
None
complete
4
2013-07-09
2012-10-20
Walter
No

4.0.1
/**********
5.1.1.11. instanceMethod

-instanceMethod(methodname)----------------------------------><
Returns the corresponding Method class instance if the methodname is a
valid method of the class.
Otherwise it returns the Nil object.
**********/
Parse Version v
Say v
a=.array~of('A','B')
Say a~instancemethod('next')
Say a~instancemethod('nope')
/**********
a Method
3 - Say a~instancemethod('nope')
Error 97 running H:\book\imbug.rex line 3: Object method not found
Error 97.1: Object "an Array" does not understand message "NOPE"
**********/

Discussion

  • Rick McGuire

    Rick McGuire - 2012-10-20
    • assigned_to: Rick McGuire
    • pending_work_items: none --> code
     
  • Rick McGuire

    Rick McGuire - 2012-10-20

    Walter, if you are playing around with all methods like this, you might want to consider writing these as unit tests and contributing them back to the project.

     
  • Mark Miesfeld

    Mark Miesfeld - 2012-10-20

    Walter, I second that suggestion that you contribute unit tests back to the project.

    You've certainly gained enough understanding of methods at this point to have no problems understanding how to write test cases for the automation suite.

    You can go to this page:

    https://sourceforge.net/p/oorexx/code-0/8519/tree/test/releases/4.1.0/doc/

    and download the ooTestQuick.pdf doc to help you get started.

    If you subscribe to the ooRexx Users mailing list at:

    https://lists.sourceforge.net/lists/listinfo/oorexx-users

    and post any questions you have on how to get started writing the test case, I make an effort to respond promptly to questions asked on that list.

    Gain a little knowledge on how to check out the source code using svn and submit some test cases that get accepted and you would be on your way towards being nominated as a committer to the project. ;-)

     
  • Rick McGuire

    Rick McGuire - 2012-10-20

    [r8520] trunk
    [r8521] 4.1 branch

     

    Related

    Commit: [r8520]
    Commit: [r8521]

  • Rick McGuire

    Rick McGuire - 2012-10-20
    • status: open --> pending
    • pending_work_items: code --> complete
    • milestone: None --> Next_Release
     
  • Mark Miesfeld

    Mark Miesfeld - 2013-05-12
    • Group: Next_Release --> 4.1.3
     
  • Mark Miesfeld

    Mark Miesfeld - 2013-07-09
    • status: pending --> closed
     
  • Mark Miesfeld

    Mark Miesfeld - 2013-07-09

    This bug is fixed in the ooRexx 4.1.3 release.

     

Anonymous
Anonymous

Add attachments
Cancel