الفرق بين المراجعتين ل"Ruby/RegexpError"
< Ruby
اذهب إلى التنقل
اذهب إلى البحث
(أنشأ الصفحة ب'يُطلق الاستثناء <code>RangeError</code> عندما تكون قيمة عددية معطاة خارج النطاق، مثلا:<syntaxhighlight lang="ruby"> [...') |
|||
سطر 1: | سطر 1: | ||
− | يُطلق الاستثناء <code>RangeError</code> | + | يُطلق الاستثناء <code>RangeError</code> عند إعطاء تعبير نمطي غير صالح. |
− | |||
− | <noinclude> | + | الشيفرة التالية:<syntaxhighlight lang="ruby"> |
+ | Regexp.new("?") | ||
+ | |||
+ | </syntaxhighlight>ستطلق الاستثناء:<syntaxhighlight lang="ruby"> | ||
+ | RegexpError: target of repeat operator is not specified: /?/ | ||
+ | |||
+ | </syntaxhighlight><noinclude> | ||
{{DISPLAYTITLE: صفحة الصنف <code>RegexpError</code> في روبي}}</noinclude> | {{DISPLAYTITLE: صفحة الصنف <code>RegexpError</code> في روبي}}</noinclude> | ||
[[تصنيف: Ruby]] | [[تصنيف: Ruby]] | ||
سطر 8: | سطر 13: | ||
== مصادر == | == مصادر == | ||
− | *[http://ruby-doc.org/core-2.5.1/ | + | *[http://ruby-doc.org/core-2.5.1/RegexpError.html قسم الصنف RegexpError في توثيق روبي الرسمي.] |
مراجعة 16:24، 1 نوفمبر 2018
يُطلق الاستثناء RangeError
عند إعطاء تعبير نمطي غير صالح.
الشيفرة التالية:
Regexp.new("?")
ستطلق الاستثناء:
RegexpError: target of repeat operator is not specified: /?/