Skip to content

Commit

Permalink
Moved print from string to object. Added inspect, and println methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
vic committed Dec 15, 2010
1 parent 8cce19e commit 86fba7b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 11 additions & 0 deletions lib/poison/bootstrap/library/object.rb
Expand Up @@ -4,4 +4,15 @@ def poison(name, *args)
end

poison_alias :ruby, :send
poison_alias :inspect, :inspect

def pn_print
print self
end

def pn_println
puts self
end

poison_methods
end
3 changes: 0 additions & 3 deletions lib/poison/bootstrap/library/string.rb
@@ -1,7 +1,4 @@
class String
def pn_print
print self
end

def pn_number
node = Poison::Parser.new.parse self
Expand Down

0 comments on commit 86fba7b

Please sign in to comment.