X-Received: by 2002:a05:6214:f62:: with SMTP id iy2mr61716924qvb.25.1637221910789; Wed, 17 Nov 2021 23:51:50 -0800 (PST) X-Received: by 2002:a25:4146:: with SMTP id o67mr27511864yba.378.1637221910658; Wed, 17 Nov 2021 23:51:50 -0800 (PST) Path: ...!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: fr.comp.lang.ruby Date: Wed, 17 Nov 2021 23:51:50 -0800 (PST) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=147.250.2.201; posting-account=vrA3_AoAAABSTowlfoxCghbkuaJOxXlW NNTP-Posting-Host: 147.250.2.201 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: =?UTF-8?Q?Re=3A_Probl=C3=A8me_de_syntaxe_ruby?= From: Maurice Diamantini Injection-Date: Thu, 18 Nov 2021 07:51:50 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Bytes: 1874 Lines: 23 Bonjour, Il ne manquerait pas une `end` pour la class ? -- Maurice Le mardi 16 novembre 2021 =C3=A0 23:08:38 UTC+1, LaLibreParole a =C3=A9crit= =C2=A0: > Je n'arrive pas =C3=A0 voir ce qui ne va pas dans ce code:=20 >=20 > class Personne=20 > attr_accessor :nom, :points_de_vie, :en_vie=20 > def initialize(nom)=20 > @nom =3D nom=20 > @points_de_vie =3D 100=20 > @en_vie =3D true=20 > end=20 > def info=20 > if @points_de_vie > 0=20 > return @nom + @points_de_vie=20 > else=20 > return @nom + "vaincu"=20 > end=20 >=20 > Une id=C3=A9e ?