diff options
Diffstat (limited to 'sample/list3.rb')
| -rw-r--r-- | sample/list3.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sample/list3.rb b/sample/list3.rb index 1d756fdff0..110e405cf9 100644 --- a/sample/list3.rb +++ b/sample/list3.rb @@ -7,11 +7,11 @@ class Point self end - def to_s + def inspect sprintf("%d@%d", @x, @y) end end - + list1 = [10, 20, Point.new(2, 3), Point.new(4, 5)] list2 = [20, Point.new(4, 5), list1] print("list1: ", list1.inspect, "\n") |
