Feature #139

avatar

Provide better default toSource and toString methods on NativeObject

Added by Ash Berlin 320 days ago. Updated 320 days ago.

Status:Closed Start:10/24/2009
Priority:Normal Due date:
Assigned to:avatarAristid Breitkreuz % Done:

100%

Category:Interpreter / Shell
Target version:0.9

Description

Since the REPL now calls JS_ValueToSource (or what ever it is) this menas that native objects are now printed in a most unhelpfully fashion:

> require('system').stdout
({})
> require('system').stdout.toString()
"[object NativeObject]" 

The toString() is better, but both representations should probably be the same [object IO.Stream] in this case – i.e. include the full class name.

Associated revisions

Revision 9e14dcb39b8b67f367324993996f8fdc3a501d63
Added by Aristid Breitkreuz 320 days ago

core: add default toString and toSource for native classes (fixes #139)

History

Updated by Aristid Breitkreuz 320 days ago

avatar
  • % Done changed from 0 to 100
  • Target version set to 0.9
  • Status changed from New to Closed

commit:3b51f57214e27f571a19557ccc23edb66c71f3c5

Also available in: Atom PDF