查看: 2171|回复: 2

[已经过期] 脚本哪里错了

[复制链接]
梦石
0
星屑
50
在线时间
7 小时
注册时间
2013-12-9
回帖
8
发表于 2013-12-10 16:53:32 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
class People
  attr_accessor:name,:age,:motherland
end
class People
  def talk
    print "my name is#{@name},age is{@age},motherland is{@motherland}"
  end
  end

p=People.new
p.name="zhangshan"
p.age=17
p.motherland="china"
p.talk
为什么输出总是 my name is zhangshan,age is{@age},motherland is{@motherland}"

点评

楼主下次不要发错区  发表于 2013-12-10 17:48
梦石
0
星屑
382
在线时间
929 小时
注册时间
2011-3-23
回帖
830
发表于 2013-12-10 16:56:20 | 显示全部楼层
坐等删帖

点评

为什么要删帖?移动一下不就好了。  发表于 2013-12-10 17:47
回复

使用道具 举报

梦石
0
星屑
9557
在线时间
5074 小时
注册时间
2013-6-21
回帖
3459

开拓者贵宾剧作品鉴家

发表于 2013-12-10 17:15:24 | 显示全部楼层
print "my name is #{@name},age is #{@age},motherland is #{@motherland}"

评分

参与人数 1星屑 +75 收起 理由
myownroc + 75 我很赞同

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部