الصنف TypeError
في روبي
< Ruby
اذهب إلى التنقل
اذهب إلى البحث
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
يُطلق الاستثناء TypeError
عند استقبال كائن من غير النوع المتوقع.
[1, 2, 3].first("two")
عند تنفيذ هذه الشيفرة، سيُطلق الاستثناء TypeError
بالشكل التالي:
TypeError: no implicit conversion of String into Integer